chippyash/Currency

View on GitHub
src/Chippyash/Currency/Currency.php

Summary

Maintainability
A
0 mins
Test Coverage
A
96%

Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
Wontfix

    public function __construct(float $value, string $code, string $symbol, ?int $precision = 2, ?string $name = null, ?string $displayFormat = '%s')
Severity: Minor
Found in src/Chippyash/Currency/Currency.php - About 45 mins to fix

    Missing class import via use statement (line '266', column '26').
    Open

            $formatter = new \NumberFormatter($this->locale, \NumberFormatter::CURRENCY);
    Severity: Minor
    Found in src/Chippyash/Currency/Currency.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 '223', column '23').
    Open

                throw new \InvalidArgumentException('value is not numeric');
    Severity: Minor
    Found in src/Chippyash/Currency/Currency.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

    There are no issues that match your filters.

    Category
    Status