PluginProbe
Media Cloud Sync / 1.4.2
Media Cloud Sync v1.4.2
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
← All changes | includes/sdk/google/guzzlehttp/psr7/src/FnStream.php +20 -20 1.2.6 → 1.4.2 View file →
@@ -1,10 +1,10 @@
1 1 <?php
2 2
3 3 declare (strict_types=1);
4 -namespace Dudlewebs\WPMCS\GuzzleHttp\Psr7;
4 +namespace Dudlewebs\WPMCS\GCP\GuzzleHttp\Psr7;
5 5
6 -use Dudlewebs\WPMCS\Psr\Http\Message\StreamInterface;
6 +use Dudlewebs\WPMCS\GCP\Psr\Http\Message\StreamInterface;
7 7 /**
8 8 * Compose stream implementations based on a hash of functions.
9 9 *
10 10 * Allows for easy testing and extension of a provided stream without needing
@@ -31,11 +31,11 @@
31 31 * Lazily determine which methods are not implemented.
32 32 *
33 33 * @throws \BadMethodCallException
34 34 */
35 - public function __get(string $name): void
35 + public function __get(string $name) : void
36 36 {
37 - throw new \BadMethodCallException(str_replace('_fn_', '', $name) . '() is not implemented in the FnStream');
37 + throw new \BadMethodCallException(\str_replace('_fn_', '', $name) . '() is not implemented in the FnStream');
38 38 }
39 39 /**
40 40 * The close method is called on the underlying stream only if possible.
41 41 */
@@ -49,9 +49,9 @@
49 49 * An unserialize would allow the __destruct to run when the unserialized value goes out of scope.
50 50 *
51 51 * @throws \LogicException
52 52 */
53 - public function __wakeup(): void
53 + public function __wakeup() : void
54 54 {
55 55 throw new \LogicException('FnStream should never be unserialized');
56 56 }
57 57 /**
@@ -66,9 +66,9 @@
66 66 public static function decorate(StreamInterface $stream, array $methods)
67 67 {
68 68 // If any of the required methods were not provided, then simply
69 69 // proxy to the decorated stream.
70 - foreach (array_diff(self::SLOTS, array_keys($methods)) as $diff) {
70 + foreach (\array_diff(self::SLOTS, \array_keys($methods)) as $diff) {
71 71 /** @var callable $callable */
72 72 $callable = [$stream, $diff];
73 73 $methods[$diff] = $callable;
74 74 }
@@ -73,9 +73,9 @@
73 73 $methods[$diff] = $callable;
74 74 }
75 75 return new self($methods);
76 76 }
77 - public function __toString(): string
77 + public function __toString() : string
78 78 {
79 79 try {
80 80 /** @var string */
81 81 return ($this->_fn___toString)();
@@ -82,13 +82,13 @@
82 82 } catch (\Throwable $e) {
83 83 if (\PHP_VERSION_ID >= 70400) {
84 84 throw $e;
85 85 }
86 - trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), \E_USER_ERROR);
86 + \trigger_error(\sprintf('%s::__toString exception: %s', self::class, (string) $e), \E_USER_ERROR);
87 87 return '';
88 88 }
89 89 }
90 - public function close(): void
90 + public function close() : void
91 91 {
92 92 ($this->_fn_close)();
93 93 }
94 94 public function detach()
@@ -94,49 +94,49 @@
94 94 public function detach()
95 95 {
96 96 return ($this->_fn_detach)();
97 97 }
98 - public function getSize(): ?int
98 + public function getSize() : ?int
99 99 {
100 100 return ($this->_fn_getSize)();
101 101 }
102 - public function tell(): int
102 + public function tell() : int
103 103 {
104 104 return ($this->_fn_tell)();
105 105 }
106 - public function eof(): bool
106 + public function eof() : bool
107 107 {
108 108 return ($this->_fn_eof)();
109 109 }
110 - public function isSeekable(): bool
110 + public function isSeekable() : bool
111 111 {
112 112 return ($this->_fn_isSeekable)();
113 113 }
114 - public function rewind(): void
114 + public function rewind() : void
115 115 {
116 116 ($this->_fn_rewind)();
117 117 }
118 - public function seek($offset, $whence = \SEEK_SET): void
118 + public function seek($offset, $whence = \SEEK_SET) : void
119 119 {
120 120 ($this->_fn_seek)($offset, $whence);
121 121 }
122 - public function isWritable(): bool
122 + public function isWritable() : bool
123 123 {
124 124 return ($this->_fn_isWritable)();
125 125 }
126 - public function write($string): int
126 + public function write($string) : int
127 127 {
128 128 return ($this->_fn_write)($string);
129 129 }
130 - public function isReadable(): bool
130 + public function isReadable() : bool
131 131 {
132 132 return ($this->_fn_isReadable)();
133 133 }
134 - public function read($length): string
134 + public function read($length) : string
135 135 {
136 136 return ($this->_fn_read)($length);
137 137 }
138 - public function getContents(): string
138 + public function getContents() : string
139 139 {
140 140 return ($this->_fn_getContents)();
141 141 }
142 142 /**