Skip to content

Commit f9d8bb1

Browse files
committed
Remove variadic args
1 parent 78e1c2e commit f9d8bb1

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

src/Utils/ArrayObject.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,11 @@ class ArrayObject implements IteratorAggregate, Countable
2020
private $array;
2121

2222
/**
23-
* @param array|mixed... $array
23+
* @param array $array
2424
*/
25-
public function __construct($array)
25+
public function __construct(array $array)
2626
{
27-
if (func_num_args() > 1) {
28-
$this->array = func_get_args();
29-
} else {
30-
$this->array = $array;
31-
}
27+
$this->array = $array;
3228
}
3329

3430
/**

test/Util/ArrayObjectTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,4 @@ public function testGetArrayCopy()
5858
$arrayObject = new ArrayObject([1, 2, 3]);
5959
$this->assertSame([1, 2, 3], $arrayObject->getArrayCopy());
6060
}
61-
62-
public function testGetArrayCopyWithVariadicConstruction()
63-
{
64-
$arrayObject = new ArrayObject(1, 2, 3);
65-
$this->assertSame([1, 2, 3], $arrayObject->getArrayCopy());
66-
}
6761
}

0 commit comments

Comments
 (0)