@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * @param int $index |
| 41 | 41 | */ |
| 42 | 42 | public function offsetExists($index): bool { |
| 43 | - return $index >= 0 AND $index < count($this->items); |
|
| 43 | + return $index >= 0 and $index < count($this->items); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * @throws \OutOfRangeException |
| 49 | 49 | */ |
| 50 | 50 | public function offsetGet($index) { |
| 51 | - if($index < 0 OR $index >= count($this->items)) { |
|
| 51 | + if($index < 0 or $index >= count($this->items)) { |
|
| 52 | 52 | throw new \OutOfRangeException("Offset invalid or out of range."); |
| 53 | 53 | } |
| 54 | 54 | return $this->items[$index]; |
@@ -87,11 +87,11 @@ discard block |
||
| 87 | 87 | throw new \InvalidArgumentException("Argument must be of $this->class type."); |
| 88 | 88 | } elseif(!$this->checkUniqueness($item)) { |
| 89 | 89 | $property = $this->uniqueProperty; |
| 90 | - throw new \RuntimeException("Duplicate $property {$item->$property}."); |
|
| 90 | + throw new \RuntimeException("duplicate $property {$item->$property}."); |
|
| 91 | 91 | } |
| 92 | 92 | if($index === NULL) { |
| 93 | 93 | $this->items[] = & $item; |
| 94 | - } elseif($index < 0 OR $index >= count($this->items)) { |
|
| 94 | + } elseif($index < 0 or $index >= count($this->items)) { |
|
| 95 | 95 | throw new \OutOfRangeException("Offset invalid or out of range."); |
| 96 | 96 | } else { |
| 97 | 97 | $this->items[$index] = & $item; |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | public function offsetUnset($index): void { |
| 106 | 106 | if($this->locked) { |
| 107 | 107 | throw new \RuntimeException("Cannot remove items from locked collection."); |
| 108 | - } elseif($index < 0 OR $index >= count($this->items)) { |
|
| 108 | + } elseif($index < 0 or $index >= count($this->items)) { |
|
| 109 | 109 | throw new \OutOfRangeException("Offset invalid or out of range."); |
| 110 | 110 | } |
| 111 | 111 | array_splice($this->items, $index, 1); |