@@ -183,7 +183,7 @@ |
||
| 183 | 183 | { |
| 184 | 184 | if(isset($this->twig_cache_blocks[$blockName])){ |
| 185 | 185 | $this->twig_cache_blocks[$blockName] = array_merge($this->twig_cache_blocks[$blockName], $cacheBlock); |
| 186 | - }else{ |
|
| 186 | + } else{ |
|
| 187 | 187 | $this->twig_cache_blocks[$blockName] = $cacheBlock; |
| 188 | 188 | } |
| 189 | 189 | |
@@ -86,10 +86,10 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function createInstance($name, $instance) |
| 88 | 88 | { |
| 89 | - if (array_key_exists($name, $this->cacheInstances) && $this->cacheInstances[ $name ] instanceof ExtendedCacheItemPoolInterface) { |
|
| 89 | + if (array_key_exists($name, $this->cacheInstances) && $this->cacheInstances[$name] instanceof ExtendedCacheItemPoolInterface) { |
|
| 90 | 90 | throw new phpFastCacheDriverException("Cache instance '{$name}' already exists"); |
| 91 | 91 | } |
| 92 | - $this->cacheInstances[ $name ] = $instance; |
|
| 92 | + $this->cacheInstances[$name] = $instance; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
@@ -108,9 +108,9 @@ discard block |
||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | if (!array_key_exists($name, $this->cacheInstances)) { |
| 111 | - if (array_key_exists($name, $this->config[ 'drivers' ])) { |
|
| 112 | - $this->createInstance($name, CacheManager::getInstance($this->config[ 'drivers' ][ $name ][ 'type' ], $this->config[ 'drivers' ][ $name ][ 'parameters' ])); |
|
| 113 | - if (!$this->cacheInstances[ $name ] instanceof ExtendedCacheItemPoolInterface) { |
|
| 111 | + if (array_key_exists($name, $this->config['drivers'])) { |
|
| 112 | + $this->createInstance($name, CacheManager::getInstance($this->config['drivers'][$name]['type'], $this->config['drivers'][$name]['parameters'])); |
|
| 113 | + if (!$this->cacheInstances[$name] instanceof ExtendedCacheItemPoolInterface) { |
|
| 114 | 114 | throw new phpFastCacheDriverException("Cache instance '{$name}' does not implements ExtendedCacheItemPoolInterface"); |
| 115 | 115 | } |
| 116 | 116 | } else { |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | if ($this->stopwatch) { |
| 122 | 122 | $this->stopwatch->stop(__METHOD__ . "('{$name}')"); |
| 123 | 123 | } |
| 124 | - return $this->cacheInstances[ $name ]; |
|
| 124 | + return $this->cacheInstances[$name]; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /** |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | */ |
| 130 | 130 | public function getTwigCacheInstance() |
| 131 | 131 | { |
| 132 | - return $this->get($this->config[ 'twig_driver' ]); |
|
| 132 | + return $this->get($this->config['twig_driver']); |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /** |