| Conditions | 5 |
| Paths | 4 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public static function authenticate() |
||
| 28 | { |
||
| 29 | //if there is no username or password, fail |
||
| 30 | if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) { |
||
| 31 | return null; |
||
| 32 | } |
||
| 33 | |||
| 34 | // With a valid user and password, check the password is correct |
||
| 35 | $data = [ |
||
| 36 | 'Email' => $_SERVER['PHP_AUTH_USER'], |
||
| 37 | 'Password' => $_SERVER['PHP_AUTH_PW'], |
||
| 38 | ]; |
||
| 39 | $request = Controller::curr()->getRequest(); |
||
| 40 | $authenticators = Security::singleton()->getApplicableAuthenticators(Authenticator::LOGIN); |
||
| 41 | $member = null; |
||
| 42 | foreach ($authenticators as $authenticator) { |
||
| 43 | $member = $authenticator->authenticate($data, $request); |
||
| 44 | if ($member) { |
||
| 45 | break; |
||
| 46 | } |
||
| 47 | } |
||
| 48 | return $member; |
||
| 49 | } |
||
| 51 |
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