Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| DashboardContentFactory | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| create | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\ApieBundle\Wrappers; |
| 3 | |
| 4 | use Apie\Common\Interfaces\DashboardContentFactoryInterface; |
| 5 | use Twig\Environment; |
| 6 | |
| 7 | class DashboardContentFactory implements DashboardContentFactoryInterface |
| 8 | { |
| 9 | public function __construct( |
| 10 | private readonly ?Environment $environment |
| 11 | ) { |
| 12 | } |
| 13 | |
| 14 | public function create( |
| 15 | string $template, |
| 16 | array $templateParameters = [] |
| 17 | ): DashboardContents { |
| 18 | return new DashboardContents($this->environment, $template, $templateParameters); |
| 19 | } |
| 20 | } |