Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
22 | 2 | public function __invoke(AddFolder $wished): void |
|
23 | { |
||
24 | 2 | if (!$this->repository->has($wished->parent())) { |
|
25 | 1 | throw new FolderNotFound($wished->parent()); |
|
26 | } |
||
27 | |||
28 | 1 | $this->repository->add( |
|
29 | 1 | Folder::add( |
|
30 | 1 | $wished->identity(), |
|
31 | 1 | $wished->name(), |
|
32 | 1 | $wished->parent() |
|
33 | ) |
||
37 |