Completed
Push — master ( ed817b...8d2763 )
by Rob
01:55
created

SoteriaModel   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 69.23%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 47
ccs 9
cts 13
cp 0.6923
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getInput() 0 4 1
A getResult() 0 4 1
A isValid() 0 4 1
A getOutput() 0 4 1
1
<?php
2
3
namespace devtoolboxuk\soteria\models;
4
5
class SoteriaModel
6
{
7
    private $input = '';
8
    private $output = '';
9
    private $passed = true;
10
11
12 4
    function __construct($input, $output, $passed = 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...
13
    {
14 4
        $this->input = $input;
15 4
        $this->output = $output;
16 4
        $this->passed = $passed;
17 4
    }
18
19
    /**
20
     * @return string
21
     */
22
    public function getInput()
23
    {
24
        return $this->input;
25
    }
26
27
    /**
28
     * @return mixed
29
     */
30
    public function getResult()
31
    {
32
        return $this->getOutput();
33
    }
34
35
    /**
36
     * @return string
37
     */
38 3
    public function getOutput()
39
    {
40 3
        return $this->output;
41
    }
42
43
    /**
44
     * @return bool
45
     */
46 1
    public function isValid()
47
    {
48 1
        return $this->passed;
49
    }
50
51
}