File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 99use Safe \Exceptions \ExecException ;
1010
1111use Safe \Exceptions \JsonException ;
12+ use ValueError ;
1213
1314use function Safe \exec ;
1415use function Safe \json_decode ;
1516use function Safe \stream_get_contents ;
1617use function Safe \fclose ;
17- use function Safe \proc_close ;
18- use function Safe \proc_open ;
1918
2019/**
2120 * PHP Exif Exiftool Reader Adapter
@@ -204,21 +203,22 @@ protected function getCliOutput(string $command): string|false
204203 2 => array ('pipe ' , 'a ' )
205204 );
206205
206+ // @phpstan-ignore-next-line This is properly handle below, no need for the Safe version.
207207 $ process = proc_open ($ command , $ descriptorspec , $ pipes );
208208
209209 if (!is_resource ($ process )) {
210210 throw new PhpExifReaderException (
211211 'Could not open a resource to the exiftool binary '
212212 );
213213 }
214-
214+
215215 $ result = stream_get_contents ($ pipes [1 ]);
216216 fclose ($ pipes [0 ]);
217217 fclose ($ pipes [1 ]);
218218 fclose ($ pipes [2 ]);
219-
219+
220+ // @phpstan-ignore-next-line We do not need to care for that.
220221 proc_close ($ process );
221-
222222 return $ result ;
223223 }
224224}
You can’t perform that action at this time.
0 commit comments