gdbots/common-php

View on GitHub
src/Common/BigNumber.php

Summary

Maintainability
A
0 mins
Test Coverage

Remove error control operator '@' on line 18.
Open

    public function __construct($number, $scale = null)
    {
        @trigger_error(sprintf('"%s" is deprecated.  Use "Gdbots\Pbj\WellKnown\BigNumber" from "gdbots/pbj" 1.1.x or later instead.', __CLASS__), E_USER_DEPRECATED);
        parent::__construct($number, $scale);
    }
Severity: Minor
Found in src/Common/BigNumber.php by phpmd

ErrorControlOperator

Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

Example

function foo($filePath) {
    $file = @fopen($filPath); // hides exceptions
    $key = @$array[$notExistingKey]; // assigns null to $key
}

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

Line exceeds 120 characters; contains 165 characters
Open

        @trigger_error(sprintf('"%s" is deprecated.  Use "Gdbots\Pbj\WellKnown\BigNumber" from "gdbots/pbj" 1.1.x or later instead.', __CLASS__), E_USER_DEPRECATED);
Severity: Minor
Found in src/Common/BigNumber.php by phpcodesniffer

There are no issues that match your filters.

Category
Status