Completed
Push — master ( 3826b4...d26279 )
by Jakub
02:07
created
src/TCollection.php 1 patch
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
    * @param int $index
45 45
    */
46 46
   public function offsetExists($index): bool {
47
-    return $index >= 0 AND $index < count($this->items);
47
+    return $index >= 0 and $index < count($this->items);
48 48
   }
49 49
   
50 50
   /**
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
    * @throws \OutOfRangeException
53 53
    */
54 54
   public function offsetGet($index) {
55
-    if($index < 0 OR $index >= count($this->items)) {
55
+    if($index < 0 or $index >= count($this->items)) {
56 56
       throw new \OutOfRangeException("Offset invalid or out of range.");
57 57
     }
58 58
     return $this->items[$index];
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
       throw new \InvalidArgumentException("Argument must be of $this->class type.");
99 99
     } elseif(!$this->checkUniqueness($item)) {
100 100
       $property = $this->uniqueProperty;
101
-      throw new \RuntimeException("Duplicate $property {$item->$property}.");
101
+      throw new \RuntimeException("duplicate $property {$item->$property}.");
102 102
     } elseif(!$this->checkSize()) {
103 103
       throw new \RuntimeException("Collection reached its max size. Cannot add more items.");
104 104
     }
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     $this->performChecks($item);
119 119
     if($index === NULL) {
120 120
       $this->items[] = & $item;
121
-    } elseif($index < 0 OR $index >= count($this->items)) {
121
+    } elseif($index < 0 or $index >= count($this->items)) {
122 122
       throw new \OutOfRangeException("Offset invalid or out of range.");
123 123
     } else {
124 124
       $this->items[$index] = & $item;
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
   public function offsetUnset($index): void {
133 133
     if($this->locked) {
134 134
       throw new \RuntimeException("Cannot remove items from locked collection.");
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
     }
138 138
     array_splice($this->items, $index, 1);
Please login to merge, or discard this patch.