Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
12 | 3 | public function __construct(string $binary) |
|
13 | { |
||
14 | 3 | if (!is_file($binary)) { |
|
15 | 1 | throw new NotFoundException(sprintf('The executable `%s` could not be found.', $binary)); |
|
16 | } |
||
17 | |||
18 | 2 | if (!is_executable($binary)) { |
|
19 | 1 | throw new PermissionDeniedException(sprintf('`%s` is not executable.', $binary)); |
|
20 | } |
||
21 | |||
22 | 1 | $this->binary = $binary; |
|
23 | 1 | } |
|
24 | |||
30 |