You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Stream/CallableStream.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ public static function create($content, int $chunkSize = 64 * 1024): CallableStr
45
45
returnnewself($content, $chunkSize);
46
46
}
47
47
48
-
thrownewInvalidArgument(\sprintf('Expect content to be a "callable". "%s" given.', \is_object($content) ? \get_class($content) : \gettype($content)));
48
+
thrownewInvalidArgument(\sprintf('Expect content to be a "callable". "%s" given.', get_debug_type($content)));
49
49
}
50
50
51
51
publicfunctionlength(): ?int
@@ -62,7 +62,7 @@ public function getIterator(): \Traversable
62
62
{
63
63
while (true) {
64
64
if (!\is_string($data = ($this->content)($this->chunkSize))) {
65
-
thrownewInvalidArgument(\sprintf('The return value of content callback must be a string, %s returned.', \is_object($data) ? \get_class($data) : \gettype($data)));
65
+
thrownewInvalidArgument(\sprintf('The return value of content callback must be a string, %s returned.', get_debug_type($data)));
Copy file name to clipboardExpand all lines: src/Stream/FixedSizeStream.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ public function getIterator(): \Traversable
56
56
$chunk = '';
57
57
foreach ($this->contentas$buffer) {
58
58
if (!\is_string($buffer)) {
59
-
thrownewInvalidArgument(\sprintf('The return value of content callback must be a string, %s returned.', \is_object($buffer) ? \get_class($buffer) : \gettype($buffer)));
59
+
thrownewInvalidArgument(\sprintf('The return value of content callback must be a string, %s returned.', get_debug_type($buffer)));
0 commit comments