Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

Commit c4234fe

Browse files
committed
Removed deadcode, added @todo, etc.
1 parent 05ea70c commit c4234fe

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

src/DataCollector/CacheCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function collect(Request $request, Response $response, \Exception $except
8787
],
8888
'coreConfig' => [
8989
'driverList' => CacheManager::getDriverList(true),
90-
'namespacePath (deprecated)' => CacheManager::getNamespacePath(true),
90+
'namespacePath (deprecated)' => CacheManager::getNamespacePath(),
9191
],
9292
'projectConfig' => [
9393
'twig_driver' => $this->cache->getConfig()['twig_driver'],

src/Service/Phpfastcache.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ public function get($name)
9090

9191
if (!array_key_exists($name, $this->cacheInstances)) {
9292
if (array_key_exists($name, $this->config[ 'drivers' ])) {
93+
/**
94+
* @todo Implement new config Object here
95+
*/
9396
$this->createInstance($name, CacheManager::getInstance($this->config[ 'drivers' ][ $name ][ 'type' ], $this->config[ 'drivers' ][ $name ][ 'parameters' ]));
9497
if (!$this->cacheInstances[ $name ] instanceof ExtendedCacheItemPoolInterface) {
9598
throw new PhpfastcacheDriverException("Cache instance '{$name}' does not implements ExtendedCacheItemPoolInterface");

src/Twig/CacheExtension/CacheStrategy/LifetimeCacheStrategy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ public function fetchBlock($key)
8686

8787
if(!empty($cacheData) && $this->config['twig_block_debug']){
8888
return "<!-- BEGIN CACHE BLOCK OUTPUT '{$unprefixedKey}' -->\n{$cacheData}\n<!-- // END CACHE BLOCK OUTPUT '{$unprefixedKey}' -->";
89-
}else{
90-
return $cacheData;
9189
}
90+
91+
return $cacheData;
9292
}
9393

9494
/**

src/Twig/CacheExtension/Node/CacheNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function compile(\Twig_Compiler $compiler)
4646
$i = self::$cacheCount++;
4747

4848
if (version_compare(\Twig_Environment::VERSION, '1.26.0', '>=')) {
49-
$extension = 'Phpfastcache\Bundle\Twig\CacheExtension\Extension';
49+
$extension = \Phpfastcache\Bundle\Twig\CacheExtension\Extension::class;
5050
} else {
5151
$extension = 'phpfastcache_cache';
5252
}

0 commit comments

Comments
 (0)