@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public static function isInInterval(int $number, string $interval): bool { |
| 27 | - if(is_null(static::findInterval($interval)) OR $interval !== static::findInterval($interval)) { |
|
| 27 | + if(is_null(static::findInterval($interval)) or $interval !== static::findInterval($interval)) { |
|
| 28 | 28 | return false; |
| 29 | 29 | } |
| 30 | 30 | if(Strings::startsWith($interval, "{")) { |
@@ -42,9 +42,9 @@ discard block |
||
| 42 | 42 | return false; |
| 43 | 43 | } elseif($number > $limit2) { |
| 44 | 44 | return false; |
| 45 | - } elseif($number === $limit1 AND $start === "]") { |
|
| 45 | + } elseif($number === $limit1 and $start === "]") { |
|
| 46 | 46 | return false; |
| 47 | - } elseif($number === $limit2 AND $end === "[") { |
|
| 47 | + } elseif($number === $limit2 and $end === "[") { |
|
| 48 | 48 | return false; |
| 49 | 49 | } |
| 50 | 50 | return true; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * Check whether a number is within boundaries |
| 23 | 23 | */ |
| 24 | 24 | public static function isInRange(int $number, int $min, int $max): bool { |
| 25 | - return ($number >= $min AND $number <= $max); |
|
| 25 | + return ($number >= $min and $number <= $max); |
|
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | ?> |
| 29 | 29 | \ No newline at end of file |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * @param int $index |
| 50 | 50 | */ |
| 51 | 51 | public function offsetExists($index): bool { |
| 52 | - return $index >= 0 AND $index < count($this->items); |
|
| 52 | + return $index >= 0 and $index < count($this->items); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * @throws \OutOfRangeException |
| 58 | 58 | */ |
| 59 | 59 | public function offsetGet($index) { |
| 60 | - if($index < 0 OR $index >= count($this->items)) { |
|
| 60 | + if($index < 0 or $index >= count($this->items)) { |
|
| 61 | 61 | throw new \OutOfRangeException("Offset invalid or out of range."); |
| 62 | 62 | } |
| 63 | 63 | return $this->items[$index]; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | foreach($collection->items as $item) { |
| 97 | 97 | if($newItem->$uniqueProperty === $item->$uniqueProperty) { |
| 98 | - throw new \RuntimeException("Duplicate $uniqueProperty {$item->$uniqueProperty}."); |
|
| 98 | + throw new \RuntimeException("duplicate $uniqueProperty {$item->$uniqueProperty}."); |
|
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | } |
@@ -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); |