Total Complexity | 4 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class WildcardDomainField extends TextField |
||
10 | { |
||
11 | /** |
||
12 | * Validate this field as a valid hostname |
||
13 | * |
||
14 | * @param Validator $validator |
||
|
|||
15 | * @return bool |
||
16 | */ |
||
17 | public function validate($validator) |
||
18 | { |
||
19 | if ($this->checkHostname($this->Value())) { |
||
20 | return true; |
||
21 | } |
||
22 | |||
23 | $validator->validationError( |
||
24 | $this->getName(), |
||
25 | _t('DomainNameField.INVALID_DOMAIN', 'Invalid domain name'), |
||
26 | 'validation' |
||
27 | ); |
||
28 | return false; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Check if the given hostname is valid. |
||
33 | * |
||
34 | * @param string $hostname |
||
35 | * @return bool True if this hostname is valid |
||
36 | */ |
||
37 | public function checkHostname($hostname) |
||
40 | } |
||
41 | |||
42 | public function Type() |
||
45 | } |
||
46 | } |
||
47 |
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