Skip to content

Commit 5546c72

Browse files
committed
revert Safe functions unneeded
1 parent 9495e94 commit 5546c72

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/PHPExif/Adapter/Exiftool.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@
99
use Safe\Exceptions\ExecException;
1010

1111
use Safe\Exceptions\JsonException;
12+
use ValueError;
1213

1314
use function Safe\exec;
1415
use function Safe\json_decode;
1516
use function Safe\stream_get_contents;
1617
use 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
}

0 commit comments

Comments
 (0)