for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Nip\Cache\CacheManager;
/**
* Trait InteractsWithConfig
* @package Nip\Cache\CacheManager
*/
trait InteractsWithConfig
{
* @param $name
* @param null $default
$default
null
* @return array|null
protected function getConfigStore($name, $default = null)
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
protected function getConfigStore($name, /** @scrutinizer ignore-unused */ $default = null)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return $this->getConfig('stores.' . $name, $default = null);
}
* Get the filesystem connection configuration.
*
* @param string $name
* @return array
protected function getConfig($name, $default = null)
if (!function_exists('config') || !function_exists('app')) {
return $default;
try {
$config = config();
} catch (\Exception $e) {
$configName = "cache.{$name}";
if (!$config->has($configName)) {
return $config->get($configName)->toArray();