rogervila/provably-fair

View on GitHub
src/Algorithm.php

Summary

Maintainability
A
0 mins
Test Coverage

The parameter $available_algorithms is not named in camelCase.
Open

    public function __construct(
        public readonly string $value,
        ?array $available_algorithms = null,
    ) {
        if (!in_array($this->value, $available_algorithms ?? hash_hmac_algos())) {
Severity: Minor
Found in src/Algorithm.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

Line indented incorrectly; expected 4 spaces, found 8
Open

        public readonly string $value,
Severity: Minor
Found in src/Algorithm.php by phpcodesniffer

The variable $available_algorithms is not named in camelCase.
Open

    public function __construct(
        public readonly string $value,
        ?array $available_algorithms = null,
    ) {
        if (!in_array($this->value, $available_algorithms ?? hash_hmac_algos())) {
Severity: Minor
Found in src/Algorithm.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

There are no issues that match your filters.

Category
Status