Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| NotLoggedIn | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| applies | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | namespace Apie\Core\Attributes; |
| 3 | |
| 4 | use Apie\Core\Context\ApieContext; |
| 5 | use Apie\Core\ContextConstants; |
| 6 | |
| 7 | /** |
| 8 | * Tell Apie you should not be logged in to see/execute a class/method/property. |
| 9 | */ |
| 10 | final class NotLoggedIn implements ApieContextAttribute |
| 11 | { |
| 12 | public function applies(ApieContext $context): bool |
| 13 | { |
| 14 | return !$context->hasContext(ContextConstants::AUTHENTICATED_USER); |
| 15 | } |
| 16 | } |