Conditions | 7 |
Paths | 16 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 56 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
82 | public function setData(array $data) |
||
83 | { |
||
84 | if ( |
||
85 | !($trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)) || |
||
86 | !(isset($trace[1]['class']) && in_array(ForecastItemInterface::class, class_implements($trace[1]['class']))) |
||
87 | ) { |
||
88 | trigger_error('Member not available: setData', E_USER_ERROR); |
||
89 | } |
||
90 | |||
91 | $this->current = $data['current']; |
||
92 | $this->apparent = |
||
93 | isset($data['apparent']) ? $data['apparent'] : $data['current']; |
||
94 | $this->max = isset($data['max']) ? $data['max'] : $data['current']; |
||
95 | $this->min = isset($data['min']) ? $data['min'] : $data['current']; |
||
96 | |||
97 | return $this; |
||
98 | } |
||
99 | } |
||
100 |