Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
34 | 4 | protected function decodeDictionary(): ArrayObject |
|
35 | { |
||
36 | 4 | $previousState = $this->sortDictionary; |
|
37 | 4 | $this->sortDictionary = false; |
|
38 | 4 | $dictionary = parent::decodeDictionary(); |
|
39 | 4 | if ($this->sortDictionary) |
|
40 | { |
||
41 | 2 | $dictionary->ksort(SORT_STRING); |
|
42 | } |
||
43 | 4 | $this->sortDictionary = $previousState; |
|
44 | |||
45 | 4 | return $dictionary; |
|
46 | } |
||
47 | } |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.