Passed
Push — master ( a1fd67...e2e77c )
by Garion
04:50 queued 10s
created

Validator::php()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
nc 2
nop 1
dl 0
loc 7
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace SilverStripe\UserForms\Model\EditableFormField;
4
5
use SilverStripe\Forms\RequiredFields;
6
use SilverStripe\UserForms\Model\EditableCustomRule;
7
8
class Validator extends RequiredFields
9
{
10
    /**
11
     *
12
     * @var EditableFormField
0 ignored issues
show
Bug introduced by
The type SilverStripe\UserForms\M...Field\EditableFormField was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
     */
14
    protected $record = null;
15
16
    /**
17
     *
18
     * @param EditableFormField $record
19
     * @return $this
20
     */
21
    public function setRecord($record)
22
    {
23
        $this->record = $record;
24
        return $this;
25
    }
26
27
    /*
28
     * @return EditableFormField
29
     */
30
    public function getRecord()
31
    {
32
        return $this->record;
33
    }
34
35
36
    public function php($data)
37
    {
38
        if (!parent::php($data)) {
39
            return false;
40
        }
41
42
        return true;
43
    }
44
}
45