diff --git a/.php_cs b/.php_cs index 6b3d68b..8f4dd5a 100644 --- a/.php_cs +++ b/.php_cs @@ -32,6 +32,7 @@ $config->fixers( 'object_operator', 'php_closing_tag', 'remove_lines_between_uses', + 'short_array_syntax', 'short_tag', 'standardize_not_equal', 'trailing_spaces', diff --git a/src/MemoryManager.php b/src/MemoryManager.php index d1d5a07..3b43571 100644 --- a/src/MemoryManager.php +++ b/src/MemoryManager.php @@ -72,7 +72,7 @@ class MemoryManager * * @var array */ - private $unloadCandidates = array(); + private $unloadCandidates = []; /** * List of object sizes. @@ -83,7 +83,7 @@ class MemoryManager * * @var array */ - private $sizes = array(); + private $sizes = []; /** * Last modified object diff --git a/test/AccessControllerTest.php b/test/AccessControllerTest.php index f4f4ae4..a1f14ed 100644 --- a/test/AccessControllerTest.php +++ b/test/AccessControllerTest.php @@ -28,7 +28,7 @@ class AccessControllerTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->_cache = CacheFactory::adapterFactory('memory', array('memory_limit' => 0)); + $this->_cache = CacheFactory::adapterFactory('memory', ['memory_limit' => 0]); } /** diff --git a/test/MemoryManagerTest.php b/test/MemoryManagerTest.php index b9634f5..7108015 100644 --- a/test/MemoryManagerTest.php +++ b/test/MemoryManagerTest.php @@ -27,7 +27,7 @@ class MemoryManagerTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->_cache = CacheFactory::adapterFactory('memory', array('memory_limit' => 0)); + $this->_cache = CacheFactory::adapterFactory('memory', ['memory_limit' => 0]); } /** @@ -97,7 +97,7 @@ public function testProcessing() $memoryManager->setMinSize(256); $memoryManager->setMemoryLimit(1024*32); - $memObjects = array(); + $memObjects = []; for ($count = 0; $count < 64; $count++) { $memObject = $memoryManager->create(str_repeat((string)($count % 10), 1024) /* 1K */); $memObjects[] = $memObject; @@ -123,7 +123,7 @@ public function testNotEnoughSpaceThrowException() $memoryManager->setMinSize(128); $memoryManager->setMemoryLimit(1024); - $memObjects = array(); + $memObjects = []; for ($count = 0; $count < 8; $count++) { $memObject = $memoryManager->create(str_repeat((string)($count % 10), 128) /* 1K */); $memObjects[] = $memObject;