Skip to content

Commit 1ac1a91

Browse files
committed
Convert arrays to short arrays
1 parent 98709b2 commit 1ac1a91

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/Enum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ abstract class Enum implements \JsonSerializable
2929
*
3030
* @var array
3131
*/
32-
protected static $cache = array();
32+
protected static $cache = [];
3333

3434
/**
3535
* Creates a new value of some type

tests/EnumTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -166,21 +166,21 @@ public function testIsValid($value, $isValid)
166166

167167
public function isValidProvider()
168168
{
169-
return array(
169+
return [
170170
/**
171171
* Valid values
172172
*/
173-
array('foo', true),
174-
array(42, true),
175-
array(null, true),
176-
array(0, true),
177-
array('', true),
178-
array(false, true),
173+
['foo', true],
174+
[42, true],
175+
[null, true],
176+
[0, true],
177+
['', true],
178+
[false, true],
179179
/**
180180
* Invalid values
181181
*/
182-
array('baz', false)
183-
);
182+
['baz', false]
183+
];
184184
}
185185

186186
/**

0 commit comments

Comments
 (0)