| Total Complexity | 7 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class Guard |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var array |
||
| 20 | */ |
||
| 21 | private $authenticators; |
||
| 22 | |||
| 23 | public function __construct(array $authenticators = []) |
||
| 24 | { |
||
| 25 | $this->authenticators = $authenticators; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function requireAuthentication(Client $client) : bool { |
||
| 29 | /** |
||
| 30 | * @var AuthenticatorInterface $authenticator |
||
| 31 | */ |
||
| 32 | foreach ($this->authenticators as $authenticator) { |
||
| 33 | if($authenticator->requireAuthentication($client)) { |
||
| 34 | return true; |
||
| 35 | } |
||
| 36 | } |
||
| 37 | return false; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function authenticate(ServerRequestInterface $request) : ?Client |
||
| 51 | } |
||
| 52 | |||
| 53 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths