提交的内容
This commit is contained in:
35
vendor/guzzlehttp/psr7/src/FnStream.php
vendored
Executable file → Normal file
35
vendor/guzzlehttp/psr7/src/FnStream.php
vendored
Executable file → Normal file
@ -54,7 +54,7 @@ final class FnStream implements StreamInterface
|
||||
public function __destruct()
|
||||
{
|
||||
if (isset($this->_fn_close)) {
|
||||
call_user_func($this->_fn_close);
|
||||
($this->_fn_close)();
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,7 +93,8 @@ final class FnStream implements StreamInterface
|
||||
public function __toString(): string
|
||||
{
|
||||
try {
|
||||
return call_user_func($this->_fn___toString);
|
||||
/** @var string */
|
||||
return ($this->_fn___toString)();
|
||||
} catch (\Throwable $e) {
|
||||
if (\PHP_VERSION_ID >= 70400) {
|
||||
throw $e;
|
||||
@ -106,76 +107,74 @@ final class FnStream implements StreamInterface
|
||||
|
||||
public function close(): void
|
||||
{
|
||||
call_user_func($this->_fn_close);
|
||||
($this->_fn_close)();
|
||||
}
|
||||
|
||||
public function detach()
|
||||
{
|
||||
return call_user_func($this->_fn_detach);
|
||||
return ($this->_fn_detach)();
|
||||
}
|
||||
|
||||
public function getSize(): ?int
|
||||
{
|
||||
return call_user_func($this->_fn_getSize);
|
||||
return ($this->_fn_getSize)();
|
||||
}
|
||||
|
||||
public function tell(): int
|
||||
{
|
||||
return call_user_func($this->_fn_tell);
|
||||
return ($this->_fn_tell)();
|
||||
}
|
||||
|
||||
public function eof(): bool
|
||||
{
|
||||
return call_user_func($this->_fn_eof);
|
||||
return ($this->_fn_eof)();
|
||||
}
|
||||
|
||||
public function isSeekable(): bool
|
||||
{
|
||||
return call_user_func($this->_fn_isSeekable);
|
||||
return ($this->_fn_isSeekable)();
|
||||
}
|
||||
|
||||
public function rewind(): void
|
||||
{
|
||||
call_user_func($this->_fn_rewind);
|
||||
($this->_fn_rewind)();
|
||||
}
|
||||
|
||||
public function seek($offset, $whence = SEEK_SET): void
|
||||
{
|
||||
call_user_func($this->_fn_seek, $offset, $whence);
|
||||
($this->_fn_seek)($offset, $whence);
|
||||
}
|
||||
|
||||
public function isWritable(): bool
|
||||
{
|
||||
return call_user_func($this->_fn_isWritable);
|
||||
return ($this->_fn_isWritable)();
|
||||
}
|
||||
|
||||
public function write($string): int
|
||||
{
|
||||
return call_user_func($this->_fn_write, $string);
|
||||
return ($this->_fn_write)($string);
|
||||
}
|
||||
|
||||
public function isReadable(): bool
|
||||
{
|
||||
return call_user_func($this->_fn_isReadable);
|
||||
return ($this->_fn_isReadable)();
|
||||
}
|
||||
|
||||
public function read($length): string
|
||||
{
|
||||
return call_user_func($this->_fn_read, $length);
|
||||
return ($this->_fn_read)($length);
|
||||
}
|
||||
|
||||
public function getContents(): string
|
||||
{
|
||||
return call_user_func($this->_fn_getContents);
|
||||
return ($this->_fn_getContents)();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getMetadata($key = null)
|
||||
{
|
||||
return call_user_func($this->_fn_getMetadata, $key);
|
||||
return ($this->_fn_getMetadata)($key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user