PHPSocialNetwork/phpfastcache

View on GitHub
lib/Phpfastcache/Drivers/Redis/Driver.php

Summary

Maintainability
A
1 hr
Test Coverage

Showing 2 of 2 total issues

Method driverConnect has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

protected function driverConnect(): bool
{
if (isset($this->instance) && $this->instance instanceof RedisClient) {
throw new PhpfastcacheLogicException('Already connected to Redis server');
}
Severity: Minor
Found in lib/Phpfastcache/Drivers/Redis/Driver.php - About 1 hr to fix

    Function driverConnect has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    protected function driverConnect(): bool
    {
    if (isset($this->instance) && $this->instance instanceof RedisClient) {
    throw new PhpfastcacheLogicException('Already connected to Redis server');
    }
    Severity: Minor
    Found in lib/Phpfastcache/Drivers/Redis/Driver.php - About 55 mins to fix
    Category
    Status