Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
8 / 8 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| ApieFilesystemFactory | |
100.00% |
8 / 8 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| create | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\ApieFileSystem; |
| 3 | |
| 4 | use Apie\ApieFileSystem\Virtual\RootFolder; |
| 5 | use Apie\Common\ActionDefinitionProvider; |
| 6 | use Apie\Core\BoundedContext\BoundedContextHashmap; |
| 7 | use Apie\Core\Context\ApieContext; |
| 8 | |
| 9 | class ApieFilesystemFactory |
| 10 | { |
| 11 | public function __construct( |
| 12 | private readonly ActionDefinitionProvider $actionDefinitionProvider, |
| 13 | private readonly BoundedContextHashmap $boundedContextHashmap, |
| 14 | ) { |
| 15 | } |
| 16 | public function create(ApieContext $apieContext): ApieFilesystem |
| 17 | { |
| 18 | return new ApieFilesystem( |
| 19 | new RootFolder( |
| 20 | $this->boundedContextHashmap, |
| 21 | $this->actionDefinitionProvider, |
| 22 | $apieContext |
| 23 | ) |
| 24 | ); |
| 25 | } |
| 26 | } |