Smarty_CacheResource_KeyValueStore
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
{
/**
* cache for contents
* @var array
Function invalidate
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function invalidate($cid = null, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
{
$now = microtime(true);
$key = null;
// invalidate everything
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method listInvalidationKeys
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function listInvalidationKeys($cid, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
{
$t = array('IVK#ALL');
$_name = $_compile = '#';
if ($resource_name) {
Method fetch
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function fetch($cid, $resource_name = null, $cache_id = null, $compile_id = null, &$content = null, &$timestamp = null, $resource_uid = null)
Function getTemplateUid
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function getTemplateUid(Smarty $smarty, $resource_name, $cache_id, $compile_id)
{
$uid = '';
if (isset($resource_name)) {
$tpl = new $smarty->template_class($resource_name, $smarty);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method invalidate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function invalidate($cid = null, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
Method getLatestInvalidationTimestamp
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function getLatestInvalidationTimestamp($cid, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
Method clear
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time)
Method listInvalidationKeys
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function listInvalidationKeys($cid, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
Function listInvalidationKeys
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function listInvalidationKeys($cid, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
{
$t = array('IVK#ALL');
$_name = $_compile = '#';
if ($resource_name) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function process
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function process(Smarty_Internal_Template $_template, Smarty_Template_Cached $cached=null)
{
if (!$cached) {
$cached = $_template->cached;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"