@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | /** |
79 | 79 | * @var null|int|string The key that the item is added to the array. |
80 | 80 | */ |
81 | - private null|int|string $_key = null; |
|
81 | + private null | int | string $_key = null; |
|
82 | 82 | |
83 | 83 | /** |
84 | 84 | * @var mixed The item subscribing to the array. |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * @var null|bool|int Is the array an associative array. False for a "list" style array. |
96 | 96 | * null for discovery of the style of array on subscribe. default true. |
97 | 97 | */ |
98 | - protected null|bool|int $_isAssoc = true; |
|
98 | + protected null | bool | int $_isAssoc = true; |
|
99 | 99 | |
100 | 100 | /** |
101 | 101 | * @var bool Is the item inserted into the collection. |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | * the item. Default 1 for true except for TList. |
136 | 136 | * @param bool $autoSubscribe Should the |
137 | 137 | */ |
138 | - public function __construct(mixed &$array = null, mixed $key = null, mixed $item = null, null|int|float $priority = null, null|bool|int $isAssociative = 1, ?bool $autoSubscribe = null) |
|
138 | + public function __construct(mixed &$array = null, mixed $key = null, mixed $item = null, null | int | float $priority = null, null | bool | int $isAssociative = 1, ?bool $autoSubscribe = null) |
|
139 | 139 | { |
140 | 140 | $this->setArray($array); |
141 | 141 | $this->setKey($key); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | * @param bool $weak |
178 | 178 | * @return array|ArrayAccess The subscribed array-collection, passed by reference. |
179 | 179 | */ |
180 | - public function &getArray(bool $weak = false): array|ArrayAccess|WeakReference|null |
|
180 | + public function &getArray(bool $weak = false): array | ArrayAccess | WeakReference | null |
|
181 | 181 | { |
182 | 182 | if ($this->_array instanceof WeakReference) { |
183 | 183 | if ($weak) { |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | * @throws TInvalidOperationException If the item is already subscribed. |
203 | 203 | * @return static The current object. |
204 | 204 | */ |
205 | - public function setArray(null|array|ArrayAccess &$value): static |
|
205 | + public function setArray(null | array | ArrayAccess & $value): static |
|
206 | 206 | { |
207 | 207 | if ($this->_isSubscribed) { |
208 | 208 | throw new TInvalidOperationException('arraysubscription_no_change', 'Array'); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * with the TList (by {@see \Prado\Collections\TList::indexOf()}) or array (by array_search). |
224 | 224 | * @return null|int|string The key for the item subscription to the array. |
225 | 225 | */ |
226 | - public function getKey(): null|int|string |
|
226 | + public function getKey(): null | int | string |
|
227 | 227 | { |
228 | 228 | $collection = &$this->getArray(); |
229 | 229 | if ($this->_isSubscribed && $this->_key === null) { |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | * as a list from (0, ..., count() - 1). if null, where needed, the "list"ness |
323 | 323 | * of the array will be determined by {@see \Prado\Util\Helpers\TArrayHelper::array_is_list()}. |
324 | 324 | */ |
325 | - public function getIsAssociative(): null|bool|int |
|
325 | + public function getIsAssociative(): null | bool | int |
|
326 | 326 | { |
327 | 327 | return $this->_isAssoc; |
328 | 328 | } |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | * @throws TInvalidOperationException If the item is already subscribed. |
335 | 335 | * @return static The current object. |
336 | 336 | */ |
337 | - public function setIsAssociative(null|bool|int $value = null): static |
|
337 | + public function setIsAssociative(null | bool | int $value = null): static |
|
338 | 338 | { |
339 | 339 | if ($this->_isSubscribed) { |
340 | 340 | throw new TInvalidOperationException('arraysubscription_no_change', 'Key'); |