Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
5 / 5 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| FrameworkContextBuilder | |
100.00% |
5 / 5 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| process | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Common\ContextBuilders; |
| 3 | |
| 4 | use Apie\Core\Context\ApieContext; |
| 5 | use Apie\Core\ContextBuilders\ContextBuilderInterface; |
| 6 | use Apie\Core\ContextConstants; |
| 7 | |
| 8 | final class FrameworkContextBuilder implements ContextBuilderInterface |
| 9 | { |
| 10 | public function __construct( |
| 11 | private readonly string $frameworkName |
| 12 | ) { |
| 13 | } |
| 14 | |
| 15 | public function process(ApieContext $context): ApieContext |
| 16 | { |
| 17 | return $context->withContext( |
| 18 | ContextConstants::FRAMEWORK, |
| 19 | $this->frameworkName |
| 20 | ); |
| 21 | } |
| 22 | } |