HuasoFoundries/jpgraph

View on GitHub

Showing 6,805 of 6,805 total issues

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

    public function E($aXMin, $aXMax, $aSteps = 50)
    {
        $this->iMin      = $aXMin;
        $this->iMax      = $aXMax;
        $this->iStepSize = ($aXMax - $aXMin) / $aSteps;
Severity: Minor
Found in src/util/FuncGenerator.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

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

    public function Raise($aMsg, $aHalt = false)
    {
        if ($this->iDest != '') {
            if ($this->iDest == 'syslog') {
                error_log($this->iTitle . $aMsg);
Severity: Minor
Found in src/util/JpGraphErrObject.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

The method Center has a boolean flag argument $aYAbsPos, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function Center($aLeft, $aRight, $aYAbsPos = false)
Severity: Minor
Found in src/text/Text.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method Show has a boolean flag argument $aShow, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function Show($aShow = true)
Severity: Minor
Found in src/text/TextProperty.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method GetAutoTicks has a boolean flag argument $aMinor, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function GetAutoTicks($aMin, $aMax, $aMaxTicks = 10, $aMinor = false)
Severity: Minor
Found in src/util/DateScaleUtils.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method E() contains an eval expression.
Open

        @eval($t);
Severity: Minor
Found in src/util/FuncGenerator.php by phpmd

EvalExpression

Since: 0.2

An eval-expression is untestable, a security risk and bad practice. Therefore it should be avoided. Consider to replace the eval-expression with regular code.

Example

class Foo {
    public function bar($param)  {
        if ($param === 42) {
            eval('$param = 23;');
        }
    }
}

Source https://phpmd.org/rules/design.html#evalexpression

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

    public function Raise($aMsg, $aHalt = false)
    {
        if ($this->iDest != '') {
            if ($this->iDest == 'syslog') {
                error_log($this->iTitle . $aMsg);
Severity: Minor
Found in src/util/JpGraphErrObject.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

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

    public function File($family, $style = FS_NORMAL, $font_path = null)
    {
        $fam = @$this->font_files[$family];
        if (!$fam) {
            Util\JpGraphError::RaiseL(25046, $family); //("Specified TTF font family (id=$family) is unknown or does not exist. Please note that TTF fonts are not distributed with JpGraph for copyright reasons. You can find the MS TTF WEB-fonts (arial, courier etc) for download at http://corefonts.sourceforge.net/");
Severity: Minor
Found in src/text/TTF.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

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

    public static function GenImgName()
    {
        // Determine what format we should use when we save the images
        $supported = imagetypes();
        if ($supported & IMG_PNG) {
Severity: Minor
Found in src/util/Helper.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

The method Raise has a boolean flag argument $aHalt, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function Raise($aMsg, $aHalt = true)
Severity: Minor
Found in src/util/JpGraphError.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

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

    public static function FromCSV2($aFile, &$aData, $aOptions = [])
    {
        $aDefaults = [
            'separator'    => ',',
            'enclosure'    => chr(34),
Severity: Minor
Found in src/util/ReadFileData.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

The method _fileCheck has a boolean flag argument $debug, which is a certain sign of a Single Responsibility Principle violation.
Open

    private function _fileCheck($filename, &$ownFixtures = [], $debug = false)
Severity: Minor
Found in tests/UnitTestTrait.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method _fileCheck has a boolean flag argument $debug, which is a certain sign of a Single Responsibility Principle violation.
Open

    private function _fileCheck($filename, &$ownFixtures = [], $debug = false)
Severity: Minor
Found in tests/GanttTest.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

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

    public function Raise($aMsg, $aHalt = false)
    {
        if ($this->iDest != '') {
            if ($this->iDest == 'syslog') {
                error_log($this->iTitle . $aMsg);
Severity: Minor
Found in src/util/JpGraphErrObject.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

The method Raise has a boolean flag argument $aHalt, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function Raise($aMsg, $aHalt = true)
Severity: Minor
Found in src/util/JpGraphErrObjectImg.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

The method SetImageFlag has a boolean flag argument $aFlg, which is a certain sign of a Single Responsibility Principle violation.
Open

    public static function SetImageFlag($aFlg = true)
Severity: Minor
Found in src/util/JpGraphError.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

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

    public static function FromMatrix($aFile, $aSepChar = ' ')
    {
        $lines = @file($aFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
        if ($lines === false) {
            return false;
Severity: Minor
Found in src/util/ReadFileData.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

The method _normalizeTestGroup has a boolean flag argument $debug, which is a certain sign of a Single Responsibility Principle violation.
Open

    private function _normalizeTestGroup($filename, &$ownFixtures = [], $example_title = 'file_iterator', $debug = false, $attributes = [])
Severity: Minor
Found in tests/UnitTestTrait.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

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

    public function Set($aLocale)
    {
        if (in_array($aLocale, array_keys($this->iDayAbb), true)) {
            $this->iLocale = $aLocale;

Severity: Minor
Found in src/util/DateLocale.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

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

    public static function FromCSV($aFile, &$aData, $aSepChar = ',', $aMaxLineLength = 1024)
    {
        $rh = @fopen($aFile, 'r');
        if ($rh === false) {
            return false;
Severity: Minor
Found in src/util/ReadFileData.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

Severity
Category
Status
Source
Language