@@ -82,7 +82,7 @@ |
||
| 82 | 82 | if ($value === null) { |
| 83 | 83 | return; |
| 84 | 84 | } |
| 85 | - if($this->_r === null || Prado::isCallingSelf()) { |
|
| 85 | + if ($this->_r === null || Prado::isCallingSelf()) { |
|
| 86 | 86 | $this->_r = TPropertyValue::ensureBoolean($value); |
| 87 | 87 | } else { |
| 88 | 88 | throw new TInvalidOperationException('map_readonly_set', $this::class); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | */ |
| 184 | 184 | public function setDiscardInvalid($value): void |
| 185 | 185 | { |
| 186 | - if($value === $this->_discardInvalid) { |
|
| 186 | + if ($value === $this->_discardInvalid) { |
|
| 187 | 187 | return; |
| 188 | 188 | } |
| 189 | 189 | if ($this->_discardInvalid !== null && !Prado::isCallingSelf()) { |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | $this->weakAdd($object); |
| 199 | 199 | } |
| 200 | 200 | if ($object === null) { |
| 201 | - $this->_c--; //on read only, parent::removeAt won't remove for scrub. |
|
| 201 | + $this->_c--; //on read only, parent::removeAt won't remove for scrub. |
|
| 202 | 202 | if ($i === $this->_c) { |
| 203 | 203 | array_pop($this->_d); |
| 204 | 204 | } else { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | if ($value === $this->_dp) { |
| 102 | 102 | return; |
| 103 | 103 | } |
| 104 | - if($this->_dp === null || Prado::isCallingSelf()) { |
|
| 104 | + if ($this->_dp === null || Prado::isCallingSelf()) { |
|
| 105 | 105 | $this->_dp = (string) round(TPropertyValue::ensureFloat($value), $this->getPrecision()); |
| 106 | 106 | } else { |
| 107 | 107 | throw new TInvalidOperationException('prioritytrait_no_set_default_priority'); |
@@ -130,13 +130,13 @@ discard block |
||
| 130 | 130 | if ($value === $this->_p) { |
| 131 | 131 | return; |
| 132 | 132 | } |
| 133 | - if($this->_p !== null && !Prado::isCallingSelf()) { |
|
| 133 | + if ($this->_p !== null && !Prado::isCallingSelf()) { |
|
| 134 | 134 | throw new TInvalidOperationException('prioritytrait_no_set_precision'); |
| 135 | 135 | } |
| 136 | 136 | $this->_p = TPropertyValue::ensureInteger($value); |
| 137 | 137 | $this->setDefaultPriority($this->_dp); |
| 138 | 138 | $_d = []; |
| 139 | - foreach(array_keys($this->_d) as $priority) { |
|
| 139 | + foreach (array_keys($this->_d) as $priority) { |
|
| 140 | 140 | $newPriority = $this->ensurePriority($priority); |
| 141 | 141 | if (array_key_exists($newPriority, $_d)) { |
| 142 | 142 | if ($this->getPriorityCombineStyle()) { |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | } |
| 283 | 283 | $items[] = $itemsatpriority; |
| 284 | 284 | } |
| 285 | - if(empty($items)) { |
|
| 285 | + if (empty($items)) { |
|
| 286 | 286 | return []; |
| 287 | 287 | } |
| 288 | 288 | if ($this->getPriorityCombineStyle()) { |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | } |
| 310 | 310 | $items[] = $itemsatpriority; |
| 311 | 311 | } |
| 312 | - if(empty($items)) { |
|
| 312 | + if (empty($items)) { |
|
| 313 | 313 | return []; |
| 314 | 314 | } |
| 315 | 315 | if ($this->getPriorityCombineStyle()) { |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | */ |
| 227 | 227 | public function setDiscardInvalid($value): void |
| 228 | 228 | { |
| 229 | - if($value === $this->_discardInvalid) { |
|
| 229 | + if ($value === $this->_discardInvalid) { |
|
| 230 | 230 | return; |
| 231 | 231 | } |
| 232 | 232 | if ($this->_discardInvalid !== null && !Prado::isCallingSelf()) { |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | if ($a && is_object($this->_d[$priority][$i][0]) || !$a && is_object($this->_d[$priority][$i])) { |
| 242 | 242 | $obj = $a ? $this->_d[$priority][$i][0] : $this->_d[$priority][$i]; |
| 243 | 243 | if ($obj instanceof WeakReference) { |
| 244 | - if($obj = $obj->get()) { |
|
| 244 | + if ($obj = $obj->get()) { |
|
| 245 | 245 | $this->weakAdd($obj); |
| 246 | 246 | } else { |
| 247 | 247 | parent::removeAtIndexInPriority($i, $priority); |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | if ($value === null) { |
| 90 | 90 | return; |
| 91 | 91 | } |
| 92 | - if($this->_r === null || Prado::isCallingSelf()) { |
|
| 92 | + if ($this->_r === null || Prado::isCallingSelf()) { |
|
| 93 | 93 | $this->_r = TPropertyValue::ensureBoolean($value); |
| 94 | 94 | } else { |
| 95 | 95 | throw new TInvalidOperationException('list_readonly_set', $this::class); |