@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * @param int $index |
| 51 | 51 | */ |
| 52 | 52 | public function offsetExists($index): bool { |
| 53 | - return $index >= 0 AND $index < count($this->items); |
|
| 53 | + return $index >= 0 and $index < count($this->items); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * @throws \OutOfRangeException |
| 60 | 60 | */ |
| 61 | 61 | public function offsetGet($index) { |
| 62 | - if($index < 0 OR $index >= count($this->items)) { |
|
| 62 | + if($index < 0 or $index >= count($this->items)) { |
|
| 63 | 63 | throw new \OutOfRangeException("Offset invalid or out of range."); |
| 64 | 64 | } |
| 65 | 65 | return $this->items[$index]; |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | return; |
| 97 | 97 | } |
| 98 | 98 | if($this->hasItems([$uniqueProperty => $newItem->$uniqueProperty])) { |
| 99 | - throw new \RuntimeException("Duplicate $uniqueProperty {$newItem->$uniqueProperty}."); |
|
| 99 | + throw new \RuntimeException("duplicate $uniqueProperty {$newItem->$uniqueProperty}."); |
|
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $this->performChecks($item); |
| 133 | 133 | if($index === null) { |
| 134 | 134 | $this->items[] = & $item; |
| 135 | - } elseif($index < 0 OR $index >= count($this->items)) { |
|
| 135 | + } elseif($index < 0 or $index >= count($this->items)) { |
|
| 136 | 136 | throw new \OutOfRangeException("Offset invalid or out of range."); |
| 137 | 137 | } else { |
| 138 | 138 | $this->items[$index] = & $item; |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | public function offsetUnset($index): void { |
| 147 | 147 | if($this->locked) { |
| 148 | 148 | throw new \RuntimeException("Cannot remove items from locked collection."); |
| 149 | - } elseif($index < 0 OR $index >= count($this->items)) { |
|
| 149 | + } elseif($index < 0 or $index >= count($this->items)) { |
|
| 150 | 150 | throw new \OutOfRangeException("Offset invalid or out of range."); |
| 151 | 151 | } |
| 152 | 152 | array_splice($this->items, $index, 1); |