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

Commit 9df24ca

Browse files
author
Petr Knap
committed
Merge branch 'feature/php_5-3_support' into develop
2 parents 758f83b + fc510a5 commit 9df24ca

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212
],
1313
"homepage": "https://github.com/petrknap/php-enum",
1414
"config": {
15-
"preferred-install": "dist"
15+
"preferred-install": "dist",
16+
"platform": {
17+
"php": "5.3.3"
18+
}
1619
},
1720
"require": {
18-
"php": ">=5.4"
21+
"php": ">=5.3.3"
1922
},
2023
"require-dev": {
2124
"phpunit/phpunit": "4.*"

src/Enum/AbstractEnum.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ abstract class AbstractEnum
2121
/**
2222
* @var mixed[][]
2323
*/
24-
private static $members = [];
24+
private static $members = array();
2525

2626
/**
2727
* @var string
@@ -65,7 +65,7 @@ public static function __callStatic($memberName, array $args)
6565
$instances = &self::$instances[$className];
6666

6767
if (!is_array($instances)) {
68-
$instances = [];
68+
$instances = array();
6969
}
7070

7171
$instance = &$instances[$memberName];

tests/Enum/EnumTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ class EnumTest extends \PHPUnit_Framework_TestCase
99
{
1010
public function goodKeyProvider()
1111
{
12-
return [["MY_TRUE", 1], ["MY_FALSE", 2]];
12+
return array(array("MY_TRUE", 1), array("MY_FALSE", 2));
1313
}
1414

1515
public function wrongKeyProvider()
1616
{
17-
return [["MY_NULL"], ["MY_VOID"]];
17+
return array(array("MY_NULL"), array("MY_VOID"));
1818
}
1919

2020
/**

tests/Enum/EnumTest/MyBoolean.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ class MyBoolean extends AbstractEnum
1212
{
1313
protected function members()
1414
{
15-
return [
15+
return array(
1616
"MY_TRUE" => 1,
1717
"MY_FALSE" => 2
18-
];
18+
);
1919
}
2020

2121
/**

0 commit comments

Comments
 (0)