summaryrefslogtreecommitdiff
path: root/vendor/guzzlehttp/psr7/src/StreamWrapper.php
diff options
context:
space:
mode:
authorwn_ <invalid@email.com>2024-10-07 20:22:01 +0000
committerwn_ <invalid@email.com>2024-10-07 20:22:01 +0000
commit124c4e254250ebac336392711b32dfd6fa3caef3 (patch)
treeab331cad28c1619db93474c846b11dc3e131c85f /vendor/guzzlehttp/psr7/src/StreamWrapper.php
parentdf489df309dc831b357a9cc36fe72ad5a99d22e0 (diff)
Update Guzzle to 7.9.2
https://github.com/guzzle/guzzle/releases
Diffstat (limited to 'vendor/guzzlehttp/psr7/src/StreamWrapper.php')
-rw-r--r--vendor/guzzlehttp/psr7/src/StreamWrapper.php40
1 files changed, 36 insertions, 4 deletions
diff --git a/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/vendor/guzzlehttp/psr7/src/StreamWrapper.php
index b3655cb3a..77b04d747 100644
--- a/vendor/guzzlehttp/psr7/src/StreamWrapper.php
+++ b/vendor/guzzlehttp/psr7/src/StreamWrapper.php
@@ -69,7 +69,7 @@ final class StreamWrapper
}
}
- public function stream_open(string $path, string $mode, int $options, string &$opened_path = null): bool
+ public function stream_open(string $path, string $mode, int $options, ?string &$opened_path = null): bool
{
$options = stream_context_get_options($this->context);
@@ -122,10 +122,28 @@ final class StreamWrapper
}
/**
- * @return array<int|string, int>
+ * @return array{
+ * dev: int,
+ * ino: int,
+ * mode: int,
+ * nlink: int,
+ * uid: int,
+ * gid: int,
+ * rdev: int,
+ * size: int,
+ * atime: int,
+ * mtime: int,
+ * ctime: int,
+ * blksize: int,
+ * blocks: int
+ * }|false
*/
- public function stream_stat(): array
+ public function stream_stat()
{
+ if ($this->stream->getSize() === null) {
+ return false;
+ }
+
static $modeMap = [
'r' => 33060,
'rb' => 33060,
@@ -152,7 +170,21 @@ final class StreamWrapper
}
/**
- * @return array<int|string, int>
+ * @return array{
+ * dev: int,
+ * ino: int,
+ * mode: int,
+ * nlink: int,
+ * uid: int,
+ * gid: int,
+ * rdev: int,
+ * size: int,
+ * atime: int,
+ * mtime: int,
+ * ctime: int,
+ * blksize: int,
+ * blocks: int
+ * }
*/
public function url_stat(string $path, int $flags): array
{