@@ -16,7 +16,7 @@ |
||
| 16 | 16 | private $pools = []; |
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | - * @param array $pools |
|
| 19 | + * @param callable[] $pools |
|
| 20 | 20 | */ |
| 21 | 21 | public function __construct(array $pools) |
| 22 | 22 | { |
@@ -38,12 +38,12 @@ |
||
| 38 | 38 | public function getDefinitions() |
| 39 | 39 | { |
| 40 | 40 | return [ |
| 41 | - Cache::class => function () { |
|
| 41 | + Cache::class => function() { |
|
| 42 | 42 | |
| 43 | 43 | if (count($this->pools) < 1) { |
| 44 | 44 | $pools[] = new ArrayCachePool; |
| 45 | 45 | } else { |
| 46 | - $pools = array_map(function (callable $resolver) { |
|
| 46 | + $pools = array_map(function(callable $resolver) { |
|
| 47 | 47 | return call_user_func($resolver); |
| 48 | 48 | }, $this->pools); |
| 49 | 49 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public function redis(string $host = '127.0.0.1', int $port = 6379) |
| 53 | 53 | { |
| 54 | - return $this->pool(function () use ($host, $port) { |
|
| 54 | + return $this->pool(function() use ($host, $port) { |
|
| 55 | 55 | return new PredisCachePool( |
| 56 | 56 | new Client('tcp:/' . $host . ':' . $port) |
| 57 | 57 | ); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function apc() |
| 65 | 65 | { |
| 66 | - return $this->pool(function () { |
|
| 66 | + return $this->pool(function() { |
|
| 67 | 67 | return new ApcCachePool(); |
| 68 | 68 | }); |
| 69 | 69 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function apcu() |
| 75 | 75 | { |
| 76 | - return $this->pool(function () { |
|
| 76 | + return $this->pool(function() { |
|
| 77 | 77 | return new ApcuCachePool(); |
| 78 | 78 | }); |
| 79 | 79 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function array($limit = null, array &$cache = []) |
| 87 | 87 | { |
| 88 | - return $this->pool(function () use ($limit, $cache) { |
|
| 88 | + return $this->pool(function() use ($limit, $cache) { |
|
| 89 | 89 | return new ArrayCachePool($limit, $cache); |
| 90 | 90 | }); |
| 91 | 91 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | public function memcache(string $host = '127.0.0.1', int $port = 11211) |
| 99 | 99 | { |
| 100 | - return $this->pool(function () use ($host, $port) { |
|
| 100 | + return $this->pool(function() use ($host, $port) { |
|
| 101 | 101 | |
| 102 | 102 | $client = new Memcache(); |
| 103 | 103 | $client->connect($host, $port); |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | public function memcached(string $host = '127.0.0.1', int $port = 11211) |
| 117 | 117 | { |
| 118 | - return $this->pool(function () use ($host, $port) { |
|
| 118 | + return $this->pool(function() use ($host, $port) { |
|
| 119 | 119 | |
| 120 | 120 | $client = new Memcached(); |
| 121 | 121 | $client->addServer($host, $port); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | public function file(FolderStructureConvention $folderStructure) |
| 134 | 134 | { |
| 135 | - return $this->pool(function () use ($folderStructure) { |
|
| 135 | + return $this->pool(function() use ($folderStructure) { |
|
| 136 | 136 | |
| 137 | 137 | $filesystem = new Filesystem( |
| 138 | 138 | new Local($folderStructure->cachePath()) |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | */ |
| 148 | 148 | public function void() |
| 149 | 149 | { |
| 150 | - return $this->pool(function () { |
|
| 150 | + return $this->pool(function() { |
|
| 151 | 151 | return new VoidCachePool(); |
| 152 | 152 | }); |
| 153 | 153 | } |