seregazhuk/php-headhunter-api

View on GitHub
src/Traits/EmployerManagers.php

Summary

Maintainability
A
0 mins
Test Coverage

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

    public function getManagers($employerId = false)
Severity: Minor
Found in src/Traits/EmployerManagers.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 getManagerTypes has a boolean flag argument $employerId, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getManagerTypes($employerId = false)
Severity: Minor
Found in src/Traits/EmployerManagers.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 getManagersWhoHasVacancies has a boolean flag argument $employerId, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getManagersWhoHasVacancies($employerId = false)
Severity: Minor
Found in src/Traits/EmployerManagers.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 getManager has a boolean flag argument $employerId, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getManager($managerId, $employerId = false)
Severity: Minor
Found in src/Traits/EmployerManagers.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

Expected 0 spaces before closing bracket; 1 found
Open

        if(!isset($managers['items']) ) {

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array $manager

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return bool

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string|bool $employerId

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string

Expected 1 space after IF keyword; 0 found
Open

        if(!isset($managers['items']) ) {

There are no issues that match your filters.

Category
Status