We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 3 |
Paths | 3 |
Total Lines | 27 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 15 |
CRAP Score | 3.0021 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 3 | private function accessProperty(string $type, string $name, $value = null) |
|
23 | { |
||
24 | 3 | if (\in_array($name, \array_keys(\get_object_vars($this)))) { |
|
25 | 2 | $method = $type.\ucfirst($name); |
|
26 | |||
27 | 2 | @\trigger_error( |
|
28 | 2 | \sprintf( |
|
29 | '%sting directly property %s::$%s value is deprecated as of 0.12 and will be removed in 0.13. '. |
||
30 | 'You should now use method %s::%s.', |
||
31 | 2 | \ucfirst($type), |
|
32 | 2 | __CLASS__, |
|
33 | 2 | $name, |
|
34 | 2 | __CLASS__, |
|
35 | 2 | $method |
|
36 | ), |
||
37 | 2 | \E_USER_DEPRECATED |
|
38 | ); |
||
39 | |||
40 | 2 | return $this->$method($value); |
|
41 | } |
||
42 | |||
43 | 1 | if ('set' === $type) { |
|
44 | 1 | $this->$name = $value; |
|
45 | |||
46 | 1 | return null; |
|
47 | } else { |
||
48 | return $this->$name; |
||
49 | } |
||
52 |