Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
66.67% covered (warning)
66.67%
2 / 3
66.67% covered (warning)
66.67%
2 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
SequentialBackgroundProcessPolicy
66.67% covered (warning)
66.67%
2 / 3
66.67% covered (warning)
66.67%
2 / 3
4.59
0.00% covered (danger)
0.00%
0 / 1
 staticRunStep
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
 canViewAny
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 canView
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2namespace Apie\IntegrationTests\Apie\TypeDemo\Policies;
3
4use Apie\Core\BackgroundProcess\SequentialBackgroundProcess;
5use Apie\Core\Context\ApieContext;
6use Apie\Core\Enums\ConsoleCommand;
7
8class 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}