@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | * @param XmlConvertibleInterface $object |
| 65 | 65 | * @return $this |
| 66 | 66 | */ |
| 67 | - public function convertChildren(XmlConvertibleInterface &$object) |
|
| 67 | + public function convertChildren(XmlConvertibleInterface&$object) |
|
| 68 | 68 | { |
| 69 | 69 | $children = []; |
| 70 | 70 | $service = clone $this; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | return $this; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - public function convertAttributes(XmlConvertibleInterface &$object) |
|
| 81 | + public function convertAttributes(XmlConvertibleInterface&$object) |
|
| 82 | 82 | { |
| 83 | 83 | $properties = $object->getXmlProperties(); |
| 84 | 84 | /** @var \DOMAttr $attribute */ |
@@ -191,11 +191,11 @@ discard block |
||
| 191 | 191 | return array_reduce( |
| 192 | 192 | array_filter( |
| 193 | 193 | $element->getXmlProperties(), |
| 194 | - function ($property) use ($element) { |
|
| 194 | + function($property) use ($element) { |
|
| 195 | 195 | return empty($element->{$property}); |
| 196 | 196 | } |
| 197 | 197 | ), |
| 198 | - function (bool $carry, $property) use ($element) { |
|
| 198 | + function(bool $carry, $property) use ($element) { |
|
| 199 | 199 | return $carry && $this->element->attributes->getNamedItem($property) != $element->{$property}; |
| 200 | 200 | }, |
| 201 | 201 | true |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | */ |
| 88 | 88 | protected function getIsAttribute(): \Closure |
| 89 | 89 | { |
| 90 | - return function ($value): bool { |
|
| 90 | + return function($value): bool { |
|
| 91 | 91 | return !is_array($value) && !is_object($value) && !is_null($value); |
| 92 | 92 | }; |
| 93 | 93 | } |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | ); |
| 89 | 89 | $sourceChildren = array_filter( |
| 90 | 90 | $sourceChildren, |
| 91 | - function (XmlConvertibleInterface $sourceChild) use ($targetChildren): bool { |
|
| 91 | + function(XmlConvertibleInterface $sourceChild) use ($targetChildren): bool { |
|
| 92 | 92 | foreach ($targetChildren as $targetChild) { |
| 93 | 93 | if ($targetChild->xmlEqual($sourceChild)) { |
| 94 | 94 | return false; |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | { |
| 136 | 136 | $properties = $properties |
| 137 | 137 | ?? array_map( |
| 138 | - function (\ReflectionProperty $property) { |
|
| 138 | + function(\ReflectionProperty $property) { |
|
| 139 | 139 | return $property->getName(); |
| 140 | 140 | }, |
| 141 | 141 | (new \ReflectionClass(get_called_class())) |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | ); |
| 144 | 144 | |
| 145 | 145 | |
| 146 | - return array_filter($properties, function (string $property) { |
|
| 146 | + return array_filter($properties, function(string $property) { |
|
| 147 | 147 | return !in_array($property, ['xmlChildren', 'xmlElementName']); |
| 148 | 148 | }); |
| 149 | 149 | } |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | */ |
| 162 | 162 | public function __clone() |
| 163 | 163 | { |
| 164 | - $this->xmlChildren = array_map(function ($xmlChild) { |
|
| 164 | + $this->xmlChildren = array_map(function($xmlChild) { |
|
| 165 | 165 | return clone $xmlChild; |
| 166 | 166 | }, $this->xmlChildren ?? []) ?: null; |
| 167 | 167 | } |