FilterModel   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 34
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getResult() 0 4 1
A isValid() 0 4 1
1
<?php
2
3
namespace devtoolboxuk\soteria\models;
4
5
class FilterModel
6
{
7
    private $result;
8
    private $valid = true;
9
10
    /**
11
     * FilterModel constructor.
12
     * @param $result
13
     * @param bool $valid
14
     */
15 4
    function __construct($result, $valid = true)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
16
    {
17 4
        $this->result = $result;
18 4
        $this->valid = $valid;
19 4
    }
20
21
22
    /**
23
     * @return mixed
24
     */
25 4
    public function getResult()
26
    {
27 4
        return $this->result;
28
    }
29
30
    /**
31
     * @return bool
32
     */
33 4
    public function isValid()
34
    {
35 4
        return $this->valid;
36
    }
37
38
}