改名
This commit is contained in:
@@ -151,7 +151,6 @@ class Stream implements StreamInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
@@ -165,10 +164,13 @@ class Stream implements StreamInterface
|
|||||||
* @param int $length
|
* @param int $length
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function read($length): string
|
public function read($length = -1): string
|
||||||
{
|
{
|
||||||
|
if ($length > 0) {
|
||||||
return substr($this->body, 0, $length);
|
return substr($this->body, 0, $length);
|
||||||
}
|
}
|
||||||
|
return $this->body;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user