renoki-co/php-k8s

View on GitHub

Showing 194 of 198 total issues

The method getInitContainers has a boolean flag argument $asInstance, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getInitContainers(bool $asInstance = true): array
Severity: Minor
Found in src/Kinds/K8sPod.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method allResourcesPath has a boolean flag argument $withNamespace, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function allResourcesPath(bool $withNamespace = true): string;

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method getMountedVolumes has a boolean flag argument $asInstance, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getMountedVolumes(bool $asInstance = true)
Severity: Minor
Found in src/Instances/Container.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method getContainers has a boolean flag argument $asInstance, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getContainers(bool $asInstance = true): array
Severity: Minor
Found in src/Kinds/K8sPod.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method getLivenessProbe has a boolean flag argument $asInstance, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getLivenessProbe(bool $asInstance = true)
Severity: Minor
Found in src/Instances/Container.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method addData has a boolean flag argument $encode, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function addData(string $name, $value, $encode = true)
Severity: Minor
Found in src/Kinds/K8sSecret.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

Remove error control operator '@' on line 236.
Open

    protected function watchPath(string $path, Closure $callback, array $query = ['pretty' => 1])
    {
        $resourceClass = $this->resourceClass;
        $sock = $this->createSocketConnection($this->getCallableUrl($path, $query));
        $data = null;
Severity: Minor
Found in src/KubernetesCluster.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

Avoid too many return statements within this method.
Open

        return $this->makeRequest($method, $path, $payload, $query);
Severity: Major
Found in src/KubernetesCluster.php - About 30 mins to fix

    The method getContainer has a boolean flag argument $asInstance, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getContainer(string $containerName, bool $asInstance = true)
    Severity: Minor
    Found in src/Kinds/K8sPod.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    The method getReadinessProbe has a boolean flag argument $asInstance, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getReadinessProbe(bool $asInstance = true)
    Severity: Minor
    Found in src/Instances/Container.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    The method getVolumes has a boolean flag argument $asInstance, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getVolumes(bool $asInstance = true)
    Severity: Minor
    Found in src/Kinds/K8sPod.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    The method getData has a boolean flag argument $decode, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getData(bool $decode = false)
    Severity: Minor
    Found in src/Kinds/K8sSecret.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    The method getInitContainerStatuses has a boolean flag argument $asInstance, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getInitContainerStatuses(bool $asInstance = true): array
    Severity: Minor
    Found in src/Kinds/K8sPod.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    The method getApiPathPrefix has a boolean flag argument $withNamespace, which is a certain sign of a Single Responsibility Principle violation.
    Open

        protected function getApiPathPrefix(bool $withNamespace = true, string $preNamespaceAction = null): string
    Severity: Minor
    Found in src/Traits/RunsClusterOperations.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    The method getSchedule has a boolean flag argument $asInstance, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getSchedule(bool $asInstance = true)
    Severity: Minor
    Found in src/Kinds/K8sCronJob.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    The method getNodeAffinity has a boolean flag argument $asInstance, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getNodeAffinity(bool $asInstance = true)
    Severity: Minor
    Found in src/Kinds/K8sPod.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    The method setData has a boolean flag argument $encode, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function setData(array $data, bool $encode = true)
    Severity: Minor
    Found in src/Kinds/K8sSecret.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    The method getWebhooks has a boolean flag argument $asInstance, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getWebhooks(bool $asInstance = true): array
    Severity: Minor
    Found in src/Traits/Resource/HasWebhooks.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    The method getJobTemplate has a boolean flag argument $asInstance, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getJobTemplate(bool $asInstance = true)
    Severity: Minor
    Found in src/Kinds/K8sCronJob.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    The method getRules has a boolean flag argument $asInstance, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getRules(bool $asInstance = true): array
    Severity: Minor
    Found in src/Traits/Resource/HasRules.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

    Severity
    Category
    Status
    Source
    Language