| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | protected function initFormattingAttributes(\SimpleXMLElement $node) |
||
| 32 | { |
||
| 33 | $this->formattingOptions = new ArrayList(); |
||
| 34 | |||
| 35 | /** @var \SimpleXMLElement $attribute */ |
||
| 36 | foreach ($node->attributes() as $attribute) { |
||
| 37 | |||
| 38 | /** @var string $name */ |
||
| 39 | $name = (string)$attribute->getName(); |
||
| 40 | $value = (string)$attribute; |
||
| 41 | |||
| 42 | if (in_array($name, self::$formattingAttributes)) { |
||
| 43 | $this->formattingOptions->add($name, $value); |
||
| 44 | continue; |
||
| 45 | } |
||
| 46 | } |
||
| 47 | } |
||
| 48 | |||
| 74 | } |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.