mcred/Cred-Jumper

View on GitHub

Showing 8 of 8 total issues

Avoid variables with short names like $iv. Configured minimum length is 3.
Open

        $iv = random_bytes(self::IV_LEN);
Severity: Minor
Found in src/CredentialsRepository.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $iv. Configured minimum length is 3.
Open

        $iv = substr($password, 0, self::IV_LEN);
Severity: Minor
Found in src/CredentialsRepository.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The parameter $login_url is not named in camelCase.
Open

    public function __construct(string $username, string $password, string $login_url)
    {
        $this->username = $username;
        $this->password = $password;
        $this->login_url = $login_url;
Severity: Minor
Found in src/Credential.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The property $login_url is not named in camelCase.
Open

class Credential
{
    private $username;
    private $password;
    private $login_url;
Severity: Minor
Found in src/Credential.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public function getById(int $id) : Credential
Severity: Minor
Found in src/CredentialsRepository.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Missing class import via use statement (line '68', column '23').
Open

            throw new \Exception('New Credential could not be saved.');
Severity: Minor
Found in src/CredentialsRepository.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

Missing class import via use statement (line '41', column '23').
Open

            throw new \InvalidArgumentException('Credential is missing required fields.');
Severity: Minor
Found in src/CredentialsRepository.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

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

The variable $login_url is not named in camelCase.
Open

    public function __construct(string $username, string $password, string $login_url)
    {
        $this->username = $username;
        $this->password = $password;
        $this->login_url = $login_url;
Severity: Minor
Found in src/Credential.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

Severity
Category
Status
Source
Language