1 | <?php |
||
12 | final class SniffPropertyValuesExtractor |
||
13 | { |
||
14 | /** |
||
15 | * @var bool[] |
||
16 | */ |
||
17 | private $stringToBoolMap = [ |
||
18 | 'true' => true, |
||
19 | 'TRUE' => true, |
||
20 | 'false' => false, |
||
21 | 'FALSE' => false |
||
22 | ]; |
||
23 | |||
24 | 9 | public function extractFromRuleXmlElement(SimpleXMLElement $ruleXmlElement) : array |
|
39 | |||
40 | /** |
||
41 | * @return mixed |
||
42 | */ |
||
43 | 8 | private function normalizeValue(string $value, SimpleXMLElement $propertyXmlElement) |
|
57 | |||
58 | 7 | private function isArrayValue(SimpleXMLElement $property) : bool |
|
62 | |||
63 | /** |
||
64 | * @return mixed |
||
65 | */ |
||
66 | 6 | private function normalizeBoolValue(string $value) |
|
74 | |||
75 | 5 | private function normalizeArrayValue(string $value) : array |
|
91 | } |
||
92 |