@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Nexendrie\Utils; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Nexendrie\Utils; |
| 5 | 5 | |
@@ -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); |
@@ -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; |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Nexendrie\Utils; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Nexendrie\Utils; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Nexendrie\Utils; |
| 5 | 5 | |