Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
66.67% |
2 / 3 |
|
66.67% |
2 / 3 |
CRAP | |
0.00% |
0 / 1 |
| SequentialBackgroundProcessPolicy | |
66.67% |
2 / 3 |
|
66.67% |
2 / 3 |
4.59 | |
0.00% |
0 / 1 |
| staticRunStep | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
| canViewAny | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| canView | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | namespace Apie\IntegrationTests\Apie\TypeDemo\Policies; |
| 3 | |
| 4 | use Apie\Core\BackgroundProcess\SequentialBackgroundProcess; |
| 5 | use Apie\Core\Context\ApieContext; |
| 6 | use Apie\Core\Enums\ConsoleCommand; |
| 7 | |
| 8 | class SequentialBackgroundProcessPolicy |
| 9 | { |
| 10 | public function staticRunStep(ApieContext $apieContext): bool |
| 11 | { |
| 12 | return $apieContext->hasContext(ConsoleCommand::class) || $apieContext->hasContext('route-gen'); |
| 13 | } |
| 14 | |
| 15 | public function canViewAny(): bool |
| 16 | { |
| 17 | return true; |
| 18 | } |
| 19 | |
| 20 | public function canView(SequentialBackgroundProcess $resource): bool |
| 21 | { |
| 22 | return true; |
| 23 | } |
| 24 | } |