Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
Decision
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 allowed
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3declare(strict_types=1);
4
5namespace LambdaTwelve\OneRecord\Server\Spi;
6
7/**
8 * What a policy answers. Forbid is the spec's 403; Hide answers as if the
9 * resource did not exist (404), for hosts that must not confirm existence to
10 * parties without access.
11 */
12enum Decision
13{
14    case Allow;
15    case Forbid;
16    case Hide;
17
18    public function allowed(): bool
19    {
20        return $this === self::Allow;
21    }
22}