@@ -7,8 +7,12 @@ |
||
| 7 | 7 | namespace Transphporm\Property; |
| 8 | 8 | class Display implements \Transphporm\Property { |
| 9 | 9 | public function run(array $values, \DomElement $element, array $rules, \Transphporm\Hook\PseudoMatcher $pseudoMatcher, array $properties = []) { |
| 10 | - if ($pseudoMatcher->hasFunction('attr')) $element->removeAttribute($pseudoMatcher->getFuncArgs('attr')); |
|
| 11 | - else if (strtolower($values[0][0]) === 'none') $element->setAttribute('transphporm', 'remove'); |
|
| 12 | - else $element->setAttribute('transphporm', 'show'); |
|
| 10 | + if ($pseudoMatcher->hasFunction('attr')) { |
|
| 11 | + $element->removeAttribute($pseudoMatcher->getFuncArgs('attr')); |
|
| 12 | + } else if (strtolower($values[0][0]) === 'none') { |
|
| 13 | + $element->setAttribute('transphporm', 'remove'); |
|
| 14 | + } else { |
|
| 15 | + $element->setAttribute('transphporm', 'show'); |
|
| 16 | + } |
|
| 13 | 17 | } |
| 14 | 18 | } |
| 15 | 19 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | if (!$this->pseudoMatcher->matches($element)) return; |
| 24 | 24 | |
| 25 | 25 | foreach ($this->rules as $name => $value) { |
| 26 | - $result = $this->callProperty($name, $element, $this->getArgs($value, $element)) ; |
|
| 26 | + $result = $this->callProperty($name, $element, $this->getArgs($value, $element)); |
|
| 27 | 27 | if ($result === false) break; |
| 28 | 28 | } |
| 29 | 29 | } |