@@ -22,11 +22,11 @@ |
||
22 | 22 | * It is useful for passing it around as a DTO. |
23 | 23 | */ |
24 | 24 | class Immutable implements Data, |
25 | - ArrayDataFilter, |
|
26 | - TransformsToArguments, |
|
27 | - IteratorAggregate, |
|
28 | - Countable, |
|
29 | - JsonSerializable |
|
25 | + ArrayDataFilter, |
|
26 | + TransformsToArguments, |
|
27 | + IteratorAggregate, |
|
28 | + Countable, |
|
29 | + JsonSerializable |
|
30 | 30 | { |
31 | 31 | |
32 | 32 | use AccessorTrait, ArrayDataFilterTrait; |
@@ -322,7 +322,7 @@ |
||
322 | 322 | * |
323 | 323 | * @return Configuration |
324 | 324 | */ |
325 | - public function fromObject(object|string $object): Configuration; |
|
325 | + public function fromObject(object | string $object): Configuration; |
|
326 | 326 | |
327 | 327 | /** |
328 | 328 | * Yell if something bad has happened, or pass quietly. |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * @return Configuration |
80 | 80 | * @throws Exception |
81 | 81 | */ |
82 | - public function __call(string $name, array|null $arguments): Configuration |
|
82 | + public function __call(string $name, array | null $arguments): Configuration |
|
83 | 83 | { |
84 | 84 | if (false === $this->silent) { |
85 | 85 | throw new Exception('Unable to load the configuration file ' . \current($arguments)); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | return $this->import($parameters); |
98 | 98 | } |
99 | 99 | |
100 | - public function fromObject(object|string $object): Configuration |
|
100 | + public function fromObject(object | string $object): Configuration |
|
101 | 101 | { |
102 | 102 | if (\is_string($object) && \class_exists($object)) { |
103 | 103 | $object = new $object; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * |
144 | 144 | * @return string UUID v1 |
145 | 145 | */ |
146 | - public static function v1(string|int $address = null): string |
|
146 | + public static function v1(string | int $address = null): string |
|
147 | 147 | { |
148 | 148 | static $node, $clockSeq, $lastTimestamp; |
149 | 149 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | * @param string|int|null $address [optional] |
179 | 179 | * @return string |
180 | 180 | */ |
181 | - $nodeIdentifier = static function(string|int $address = null) use ($fetchAddress): string { |
|
181 | + $nodeIdentifier = static function(string | int $address = null) use ($fetchAddress): string { |
|
182 | 182 | $address = null !== $address |
183 | 183 | ? \str_replace([':', '-', '.'], '', (string)$address) |
184 | 184 | : $fetchAddress(); |
@@ -23,11 +23,11 @@ |
||
23 | 23 | * It will mess up your Zen. |
24 | 24 | */ |
25 | 25 | class Arguments implements Argument, |
26 | - TransformsToImmutable, |
|
27 | - NamespaceDataFilter, |
|
28 | - IteratorAggregate, |
|
29 | - Countable, |
|
30 | - JsonSerializable |
|
26 | + TransformsToImmutable, |
|
27 | + NamespaceDataFilter, |
|
28 | + IteratorAggregate, |
|
29 | + Countable, |
|
30 | + JsonSerializable |
|
31 | 31 | { |
32 | 32 | use AccessorTrait, MutatorTrait, ArrayDataFilterTrait { |
33 | 33 | MutatorTrait::__set insteadof AccessorTrait; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | { |
29 | 29 | /** @var string The key name for the node value */ |
30 | 30 | private string $val = '#'; |
31 | - private string|null $root; |
|
31 | + private string | null $root; |
|
32 | 32 | |
33 | 33 | public function __construct(?string $root, string $nodeKey = '#') |
34 | 34 | { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * |
56 | 56 | * @return string|null XML |
57 | 57 | */ |
58 | - public function serialize(mixed $data): string|null |
|
58 | + public function serialize(mixed $data): string | null |
|
59 | 59 | { |
60 | 60 | $document = new DOMDocument('1.0', 'UTF-8'); |
61 | 61 | $document->formatOutput = false; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | if (!(isset($value['@type']) && \str_starts_with($value['@type'] ?? '', 'xsd:'))) { |
274 | 274 | return $value; |
275 | 275 | } |
276 | - $value[$this->val] = match ($value['@type']) { |
|
276 | + $value[$this->val] = match($value['@type']) { |
|
277 | 277 | 'xsd:integer' => (int)$value[$this->val], |
278 | 278 | 'xsd:boolean' => \filter_var($value[$this->val], FILTER_VALIDATE_BOOL), |
279 | 279 | 'xsd:float' => (float)$value[$this->val], |