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
* @return array|null
protected function getConfigStore($name, $default = null)
$default
This check looks from 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;
/** @noinspection PhpUnhandledExceptionInspection */
$config = config();
$configName = "cache.{$name}";
if (!$config->has($configName)) {
return $config->get($configName)->toArray();
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.