| Total Complexity | 6 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | abstract class ASources implements ITree |
||
| 11 | { |
||
| 12 | /** @var string[] */ |
||
| 13 | protected array $startPath = []; |
||
| 14 | protected string $ordering = ITree::ORDER_NONE; |
||
| 15 | /** @var callable|null */ |
||
| 16 | protected $filterCallback = null; |
||
| 17 | protected bool $recursive = false; |
||
| 18 | protected ?FileNode $startNode = null; |
||
| 19 | |||
| 20 | 5 | public function setStartPath(array $path): ITree |
|
| 21 | { |
||
| 22 | 5 | $this->startPath = $path; |
|
| 23 | 5 | return $this; |
|
| 24 | } |
||
| 25 | |||
| 26 | 9 | public function setOrdering(string $order, ?string $by = null): ITree |
|
| 31 | } |
||
| 32 | |||
| 33 | 5 | public function setFilterCallback($callback): ITree |
|
| 34 | { |
||
| 35 | 5 | $this->filterCallback = $callback; |
|
| 36 | 5 | return $this; |
|
| 37 | } |
||
| 38 | |||
| 39 | 7 | public function wantDeep(bool $want): ITree |
|
| 43 | } |
||
| 44 | |||
| 45 | 11 | public function getRoot(): ?FileNode |
|
| 48 | } |
||
| 49 | } |
||
| 50 |