Showing 22 of 22 total issues
Method register
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function register(Container $app) { //initialize and validate options $app['doctrine.cache.options.initializer'] = $app->protect(function () use ($app) { static $initialized = false;
Similar blocks of code found in 2 locations. Consider refactoring. Open
$app['doctrine.cache.factory.filesystem'] = $app->protect(function ($cacheOptions) { if (empty($cacheOptions['directory'])) { throw new \RuntimeException('FilesystemCache directory not defined'); }
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
$app['doctrine.cache.factory.phpfile'] = $app->protect(function ($cacheOptions) { if (empty($cacheOptions['directory'])) { throw new \RuntimeException('FilesystemCache directory not defined'); }
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
$app['doctrine.cache.factory.memcached'] = $app->protect(function ($cacheOptions) { if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { throw new \RuntimeException('Host and port options need to be specified for memcached cache'); }
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
$app['doctrine.cache.factory.memcache'] = $app->protect(function ($cacheOptions) { if (empty($cacheOptions['host']) || empty($cacheOptions['port'])) { throw new \RuntimeException('Host and port options need to be specified for memcache cache'); }
- Read upRead up
Avoid too many return
statements within this method. Open
return new \Memcached();
Avoid too many return
statements within this method. Open
return $app['doctrine.cache.locator']($name, $options);
Avoid too many return
statements within this method. Open
return $cache;
Avoid too many return
statements within this method. Open
return $app['doctrine.cache.'.$name];
Avoid too many return
statements within this method. Open
return new VoidCache();
Avoid too many return
statements within this method. Open
return new ChainCache($caches);
Avoid too many return
statements within this method. Open
return $cache;
Avoid too many return
statements within this method. Open
return new \Memcache();
Avoid too many return
statements within this method. Open
return new ApcuCache();
Avoid too many return
statements within this method. Open
return new ArrayCache();
Avoid too many return
statements within this method. Open
return $cache;
Avoid too many return
statements within this method. Open
return $caches;
Avoid too many return
statements within this method. Open
return;
Avoid too many return
statements within this method. Open
return $app[$cacheFactoryKey]($cacheOptions);
Avoid too many return
statements within this method. Open
return new FilesystemCache($directory, $extension, $umask);