| Total Complexity | 8 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 86.36% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class UserLoginPage extends Page |
||
| 14 | { |
||
| 15 | 1 | public function canCreate($member = null, $context = array()) |
|
| 16 | { |
||
| 17 | 1 | return !self::get()->exists(); |
|
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Returns the link or the URLSegment to the account page on this site |
||
| 22 | * |
||
| 23 | * @param boolean $urlSegment Return the URLSegment only |
||
| 24 | * |
||
| 25 | * @return mixed |
||
| 26 | */ |
||
| 27 | 1 | public static function find_link($urlSegment = false) |
|
| 28 | { |
||
| 29 | 1 | $page = self::get_if_login_page_exists(); |
|
| 30 | 1 | return ($urlSegment) ? $page->URLSegment : $page->Link(); |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return object |
||
| 35 | */ |
||
| 36 | 1 | protected static function get_if_login_page_exists() |
|
| 37 | { |
||
| 38 | 1 | if ($page = DataObject::get_one(self::class)) { |
|
| 39 | 1 | return $page; |
|
| 40 | } |
||
| 41 | user_error(_t(__CLASS__ . '.NoPage', 'No CustomerLoginPage was found. |
||
| 42 | Please create one in the CMS!'), E_USER_ERROR); |
||
| 43 | return null; // just to keep static analysis happy |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * This module always requires a page model. |
||
| 48 | */ |
||
| 49 | 1 | public function requireDefaultRecords() |
|
| 67 | } |
||
| 68 | } |
||
| 69 | } |
||
| 70 |
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