@@ -40,7 +40,7 @@ class Stream implements AppendableStream
40
40
*/
41
41
private function __construct (mixed $ resource )
42
42
{
43
- if (! is_resource ($ resource )) {
43
+ if (!is_resource ($ resource )) {
44
44
throw new RuntimeException ('Invalid resource ' );
45
45
}
46
46
@@ -99,7 +99,7 @@ public static function fromFile(string $file, string $mode = 'r+'): self
99
99
{
100
100
$ resource = fopen ($ file , $ mode );
101
101
102
- if (! is_resource ($ resource )) {
102
+ if (!is_resource ($ resource )) {
103
103
throw new RuntimeException ("Can't open file $ file " );
104
104
}
105
105
@@ -131,7 +131,7 @@ public function appendStream(AppendableStream $stream): int
131
131
$ this ->assertStreamIsNotDetached ();
132
132
$ this ->assertStreamIsWriteable ();
133
133
134
- if (! $ stream ->isReadable ()) {
134
+ if (!$ stream ->isReadable ()) {
135
135
throw new RuntimeException ("Can't append not readable stream " );
136
136
}
137
137
@@ -160,7 +160,7 @@ public function getResource(): mixed
160
160
#[Override]
161
161
public function close (): void
162
162
{
163
- if (! is_resource ($ this ->resource )) {
163
+ if (!is_resource ($ this ->resource )) {
164
164
return ;
165
165
}
166
166
@@ -186,7 +186,7 @@ public function detach()
186
186
#[Override]
187
187
public function getSize (): ?int
188
188
{
189
- if (! is_resource ($ this ->resource )) {
189
+ if (!is_resource ($ this ->resource )) {
190
190
return null ;
191
191
}
192
192
@@ -217,7 +217,7 @@ public function tell(): int
217
217
#[Override]
218
218
public function eof (): bool
219
219
{
220
- if (! is_resource ($ this ->resource )) {
220
+ if (!is_resource ($ this ->resource )) {
221
221
// php.net doc: feof returns TRUE if the file pointer is at EOF or an error occurs
222
222
return true ;
223
223
}
@@ -231,7 +231,7 @@ public function eof(): bool
231
231
#[Override]
232
232
public function isSeekable (): bool
233
233
{
234
- if (! is_resource ($ this ->resource )) {
234
+ if (!is_resource ($ this ->resource )) {
235
235
return false ;
236
236
}
237
237
@@ -267,7 +267,7 @@ public function rewind(): void
267
267
{
268
268
$ this ->assertStreamIsNotDetached ();
269
269
270
- if (! $ this ->isSeekable ()) {
270
+ if (!$ this ->isSeekable ()) {
271
271
throw new RuntimeException ('Stream is not seekable ' );
272
272
}
273
273
@@ -298,7 +298,7 @@ public function write(string $string): int
298
298
#[Override]
299
299
public function isWritable (): bool
300
300
{
301
- if (! is_resource ($ this ->resource )) {
301
+ if (!is_resource ($ this ->resource )) {
302
302
return false ;
303
303
}
304
304
@@ -319,7 +319,7 @@ public function isWritable(): bool
319
319
#[Override]
320
320
public function isReadable (): bool
321
321
{
322
- if (! is_resource ($ this ->resource )) {
322
+ if (!is_resource ($ this ->resource )) {
323
323
return false ;
324
324
}
325
325
@@ -401,7 +401,7 @@ private function assertStreamIsNotDetached(): void
401
401
*/
402
402
private function assertStreamIsReadable (): void
403
403
{
404
- if (! $ this ->isReadable ()) {
404
+ if (!$ this ->isReadable ()) {
405
405
throw new RuntimeException ('Stream is not readable ' );
406
406
}
407
407
}
@@ -411,7 +411,7 @@ private function assertStreamIsReadable(): void
411
411
*/
412
412
private function assertStreamIsWriteable (): void
413
413
{
414
- if (! $ this ->isWritable ()) {
414
+ if (!$ this ->isWritable ()) {
415
415
throw new RuntimeException ('Stream is not writeable ' );
416
416
}
417
417
}
0 commit comments