Skip to content

Commit b1f0193

Browse files
committed
style fixed
1 parent 4bb8802 commit b1f0193

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/TypedArray.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function __construct(string $type, array $array = [])
6868
if (!isset($this->allowedTypes[$type])) {
6969
throw new InvalidArgumentException(__CLASS__.': '.$type.' type passed to '.__METHOD__.' not supported.');
7070
}
71-
71+
7272
//for not utilize foreach, compare sizes of array
7373
//before and after apply a filter :)
7474
if (count($array) > count(array_filter($array, $this->allowedTypes[$type]))) {
@@ -101,7 +101,7 @@ public function offsetSet($index, $newval)
101101

102102
return;
103103
}
104-
104+
105105
throw new InvalidArgumentException(__CLASS__.': Elements passed to '.__CLASS__.' must be of the type '.$this->type.'.');
106106
}
107107
}

src/TypedObjectArray.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function __construct(string $type, array $array = [])
7070

7171
//call parent constructor
7272
parent::__construct($array);
73-
73+
7474
//store array type
7575
$this->type = $type;
7676
}
@@ -94,7 +94,7 @@ public function offsetSet($index, $newval)
9494

9595
return;
9696
}
97-
97+
9898
throw new InvalidArgumentException(__CLASS__.': Elements passed to '.__CLASS__.' must be of the type '.$this->type.'.');
9999
}
100100
}

tests/TypedArrayTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,15 @@ public function testAssignWrongTypedValueToArray($type, $value)
274274
$array = new TypedArray($type);
275275
$array[] = $value;
276276
}
277-
277+
278278
/**
279279
* Test iterator.
280280
*/
281281
public function testIteratorClass()
282282
{
283283
$arrayAsParam = ['a','b','c','d','e','f','g','h','i'];
284284
$array = new TypedArray('string', $arrayAsParam);
285-
285+
286286
foreach ($array as $key => $value) {
287287
$this->assertEquals($value, $arrayAsParam[$key]);
288288
}

tests/TypedObjectArrayTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testAssignWrongTypedValueToArray()
9898
$array = new TypedObjectArray(ArrayObject::class);
9999
$array[] = new SplStack();
100100
}
101-
101+
102102
/**
103103
* Test iterator.
104104
*/
@@ -110,9 +110,9 @@ public function testIteratorClass()
110110
new ArrayObject([true, false, null]),
111111
new ArrayObject([1.0, 2.0, 3.0])
112112
];
113-
113+
114114
$array = new TypedObjectArray(ArrayObject::class, $arrayAsParam);
115-
115+
116116
foreach ($array as $key => $value) {
117117
$this->assertEquals($value, $arrayAsParam[$key]);
118118
}

0 commit comments

Comments
 (0)