Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit a421b93

Browse files
author
Petr Knap
committed
Hot-fix: Short array syntax replaced by PHP 5.3 compatible long array syntax
I'm sorry, I forget that it's supported by PHP 5.4+
1 parent 2b173a0 commit a421b93

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Enum/AbstractEnum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public static function findByValue($value)
164164
{
165165
foreach (self::getMembers() as $n => $v) {
166166
if ($value === $v) {
167-
return self::__callStatic($n, []);
167+
return self::__callStatic($n, array());
168168
}
169169
}
170170
throw new EnumException(

tests/Enum/EnumTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ public function testFindByValue($value, $expected)
9494

9595
public function dataFindByValue()
9696
{
97-
return [
98-
[1, MyBoolean::MY_TRUE()],
99-
[2, MyBoolean::MY_FALSE()],
100-
[3, new EnumException()]
101-
];
97+
return array(
98+
array(1, MyBoolean::MY_TRUE()),
99+
array(2, MyBoolean::MY_FALSE()),
100+
array(3, new EnumException())
101+
);
102102
}
103103
}

0 commit comments

Comments
 (0)