Test Setup Failed
Push — master ( 019b26...06a8de )
by Carsten
02:16
created

DevelopingAbstract::getTime()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace FilmTools\Developing;
3
4
use FilmTools\ExposureSeries\ZonesAwareTrait;
5
use FilmTools\ExposureSeries\DensitiesAwareTrait;
6
7
8
abstract class DevelopingAbstract implements DevelopingInterface
9
{
10
11
    use ZonesAwareTrait,
12
        DensitiesAwareTrait;
13
14
    /**
15
     * @var integer
16
     */
17
    public $time = null;
18
19
    /**
20
     * @var float
21
     */
22
    public $n_deviation = null;
23
24
    /**
25
     * @var float
26
     */
27
    public $speed_offset = null;
28
29
    /**
30
     * @var float
31
     */
32
    public $gamma = null;
33
34
    /**
35
     * @var float
36
     */
37
    public $beta = null;
38
39
40
41
    /**
42
     * @inherit
43
     * @implements DevelopingInterface
44
     */
45
    public function getNDeviation()
46
    {
47
        return $this->n_deviation;
48
    }
49
50
    /**
51
     * @inherit
52
     * @implements DevelopingInterface
53
     */
54
    public function getSpeedOffset()
55
    {
56
        return $this->speed_offset;
57
    }
58
59
60
    /**
61
     * @inherit
62
     * @implements DevelopingInterface
63
     */
64
    public function getGammaContrast()
65
    {
66
        return $this->gamma;
67
    }
68
69
70
    /**
71
     * @inherit
72
     * @implements DevelopingInterface
73
     */
74
    public function getBetaContrast()
75
    {
76
        return $this->beta;
77
    }
78
79
80
    /**
81
     * @return string
82
     */
83
    public function getDevelopingType()
84
    {
85
        $N = $this->getNDeviation();
86
87
        if ($N < 0):
88
            return 'pull';
89
        elseif ($N > 0):
90
            return 'push';
91
        endif;
92
        return 'normal';
93
    }
94
95
96
    /**
97
     * @inherit
98
     * @implements DevelopingInterface
99
     */
100
    public function getTime()
101
    {
102
        return $this->time;
103
    }
104
105
106
107
    /**
108
     * @param int $time
109
     */
110
    public function setTime( $time )
111
    {
112
        $this->time = $time;
113
        return $this;
114
    }
115
116
}
117