includes/libs/objectcache/BagOStuff.php
BagOStuff
has 37 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class BagOStuff implements
ExpirationAwareness,
StorageAwareness,
IStoreKeyEncoder,
LoggerAwareInterface
Method proxyCall
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function proxyCall(
string $method,
int $arg0Sig,
int $resSig,
array $genericArgs,
Function proxyCall
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function proxyCall(
string $method,
int $arg0Sig,
int $resSig,
array $genericArgs,
- 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 incrWithInit
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
abstract public function incrWithInit( $key, $exptime, $step = 1, $init = null, $flags = 0 );
Method merge
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$key,
callable $callback,
$exptime = 0,
$attempts = 10,
$flags = 0
Method proxyCall
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $method,
int $arg0Sig,
int $resSig,
array $genericArgs,
BagOStuff $wrapper
Function mergeFlagMaps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
final protected function mergeFlagMaps( array $bags ) {
$map = [];
foreach ( $bags as $bag ) {
foreach ( $bag->attrMap as $attr => $rank ) {
if ( isset( $map[$attr] ) ) {
- 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"