public function getMetadata($key = null)
	{
		if (! \is_resource($this->resource))
		{
			return null;
		}

		$metadata = \stream_get_meta_data($this->resource);

		if (! (null === $key))
		{
			return $metadata[$key] ?? null;
		}

		return $metadata;
	}
public function getMetadata($key = null)
	{
		if (! \is_resource($this->resource))
		{
			return null;
		}

		$metadata = \stream_get_meta_data($this->resource);

		if (! (null === $key))
		{
			return $metadata[$key] ?? null;
		}

		return $metadata;
	}
public function getMetadata ( $ key = null ) { if ( ! \ is_resource ( $ this -> resource ) ) { return null ; } $ metadata = \ stream_get_meta_data ( $ this -> resource ) ; if ( ! ( null === $ key ) ) { return $ metadata [ $ key ] ?? null ; } return $ metadata ; }
Gets the stream metadata

@param string $key

@return mixed

@link http://php.net/manual/en/function.stream-get-meta-data.php
Gets the stream metadata