rogervila/provably-fair

View on GitHub

Showing 34 of 34 total issues

Line indented incorrectly; expected 4 spaces, found 8
Open

        public readonly AlgorithmInterface $algorithm
Severity: Minor
Found in src/System.php by phpcodesniffer

Expected 1 space after closing parenthesis; found 0
Open

            <?php foreach ($results as $result): ?>
Severity: Minor
Found in index.php by phpcodesniffer

The variable $include_original is not named in camelCase.
Open

    public function generate(int $amount, bool $include_original = false): array
    {
        $serverSeed = $this->serverSeed;
        $results = $include_original
            ? [new Result(
Severity: Minor
Found in src/ProvablyFair.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

The variable $hash_length is not named in camelCase.
Open

    protected static function divisible(string $hash, int $mod): bool
    {
        /*  We will read in 4 hex at a time, but the first chunk might be a bit smaller
            so ABCDEFGHIJ should be chunked like  AB CDEF GHIJ */
        $value = 0;
Severity: Minor
Found in src/System.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

The variable $hash_integer is not named in camelCase.
Open

    public function calculate(SeedInterface $serverSeed, SeedInterface $clientSeed): float
    {
        $hash = $this->createHmac($serverSeed->value, $clientSeed->value);

        /* In 1 of 101 result is 0. */
Severity: Minor
Found in src/System.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

The variable $hash_mod is not named in camelCase.
Open

    protected static function divisible(string $hash, int $mod): bool
    {
        /*  We will read in 4 hex at a time, but the first chunk might be a bit smaller
            so ABCDEFGHIJ should be chunked like  AB CDEF GHIJ */
        $value = 0;
Severity: Minor
Found in src/System.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

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

The variable $include_original is not named in camelCase.
Open

    public function generate(int $amount, bool $include_original = false): array
    {
        $serverSeed = $this->serverSeed;
        $results = $include_original
            ? [new Result(
Severity: Minor
Found in src/ProvablyFair.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

The variable $hash_integer is not named in camelCase.
Open

    public function calculate(SeedInterface $serverSeed, SeedInterface $clientSeed): float
    {
        $hash = $this->createHmac($serverSeed->value, $clientSeed->value);

        /* In 1 of 101 result is 0. */
Severity: Minor
Found in src/System.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

The variable $hash_mod is not named in camelCase.
Open

    protected static function divisible(string $hash, int $mod): bool
    {
        /*  We will read in 4 hex at a time, but the first chunk might be a bit smaller
            so ABCDEFGHIJ should be chunked like  AB CDEF GHIJ */
        $value = 0;
Severity: Minor
Found in src/System.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

The variable $hash_length is not named in camelCase.
Open

    protected static function divisible(string $hash, int $mod): bool
    {
        /*  We will read in 4 hex at a time, but the first chunk might be a bit smaller
            so ABCDEFGHIJ should be chunked like  AB CDEF GHIJ */
        $value = 0;
Severity: Minor
Found in src/System.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

The variable $hash_mod is not named in camelCase.
Open

    protected static function divisible(string $hash, int $mod): bool
    {
        /*  We will read in 4 hex at a time, but the first chunk might be a bit smaller
            so ABCDEFGHIJ should be chunked like  AB CDEF GHIJ */
        $value = 0;
Severity: Minor
Found in src/System.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

The variable $hash_length is not named in camelCase.
Open

    protected static function divisible(string $hash, int $mod): bool
    {
        /*  We will read in 4 hex at a time, but the first chunk might be a bit smaller
            so ABCDEFGHIJ should be chunked like  AB CDEF GHIJ */
        $value = 0;
Severity: Minor
Found in src/System.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

The variable $hash_integer is not named in camelCase.
Open

    public function calculate(SeedInterface $serverSeed, SeedInterface $clientSeed): float
    {
        $hash = $this->createHmac($serverSeed->value, $clientSeed->value);

        /* In 1 of 101 result is 0. */
Severity: Minor
Found in src/System.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