| Conditions | 7 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 7 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 24 | 8 | public function __construct(array $files = [], ?string $baseDir = null, ?string $filter = null) |
|
| 25 | { |
||
| 26 | 8 | if (empty($baseDir) && count($files) == 0) { |
|
| 27 | 1 | throw new InvalidArgumentException('You have to specify either $baseDir or $files'); |
|
| 28 | } |
||
| 29 | |||
| 30 | if ( |
||
| 31 | 7 | (!empty($baseDir) && empty($filter)) |
|
| 32 | || |
||
| 33 | 7 | (empty($baseDir) && !empty($filter)) |
|
| 34 | ) { |
||
| 35 | 2 | throw new InvalidArgumentException('You have to specify both $filter and $baseDir to make use of these!'); |
|
| 36 | } |
||
| 37 | |||
| 38 | 5 | $this->baseDir = $baseDir; |
|
| 39 | 5 | $this->filter = $filter; |
|
| 40 | 5 | $this->files = $files; |
|
| 41 | } |
||
| 66 | } |