HuasoFoundries/jpgraph

View on GitHub

Showing 6,805 of 6,805 total issues

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

    public function __construct($aWidth = 0, $aHeight = 0, $aFormat = DEFAULT_GFORMAT, $aSetAutoMargin = true)
Severity: Minor
Found in src/image/Image.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 415.
Open

    public function GetTextWidth($txt, $angle = 0)
    {
        $tmp = preg_split('/\n/', $txt);
        $n   = safe_count($tmp);
        if ($this->font_family <= FF_FONT2 + 1) {
Severity: Minor
Found in src/image/Image.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 407.
Open

    public function GetTextWidth($txt, $angle = 0)
    {
        $tmp = preg_split('/\n/', $txt);
        $n   = safe_count($tmp);
        if ($this->font_family <= FF_FONT2 + 1) {
Severity: Minor
Found in src/image/Image.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 1172.
Open

    public function _StrokeTTF($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox, $debug = false)
    {
        // Setup default inter line margin for paragraphs to be
        // 3% of the font height.
        $ConstLineSpacing = 0.03;
Severity: Minor
Found in src/image/Image.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 _StrokeTTF has a boolean flag argument $debug, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function _StrokeTTF($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox, $debug = false)
Severity: Minor
Found in src/image/Image.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 StyleLine has a boolean flag argument $from_grid_class, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function StyleLine($x1, $y1, $x2, $y2, $aStyle = '', $from_grid_class = false)
Severity: Minor
Found in src/image/Image.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 Polygon has a boolean flag argument $fast, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function Polygon($p, $closed = false, $fast = false)
Severity: Minor
Found in src/image/Image.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 828.
Open

    public function imagettfbbox_fixed($size, $angle, $fontfile, $text)
    {
        if (!USE_LIBRARY_IMAGETTFBBOX) {
            $bbox = @imagettfbbox($size, $angle, $fontfile, $text);
            if ($bbox === false) {
Severity: Minor
Found in src/image/Image.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 Polygon has a boolean flag argument $closed, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function Polygon($p, $closed = false, $fast = false)
Severity: Minor
Found in src/image/Image.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 841.
Open

    public function imagettfbbox_fixed($size, $angle, $fontfile, $text)
    {
        if (!USE_LIBRARY_IMAGETTFBBOX) {
            $bbox = @imagettfbbox($size, $angle, $fontfile, $text);
            if ($bbox === false) {
Severity: Minor
Found in src/image/Image.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 StrokeText has a boolean flag argument $debug, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function StrokeText($x, $y, $txt, $dir = 0, $paragraph_align = 'left', $debug = false)
Severity: Minor
Found in src/image/Image.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 219.
Open

    public function MakeDirs($aFile)
    {
        $dirs = [];
        // In order to better work when open_basedir is enabled
        // we do not create directories in the root path
Severity: Minor
Found in src/image/ImgStreamCache.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 _TransVert3D has a boolean flag argument $aMinSize, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function _TransVert3D($aGdImg, $aHorizon = 100, $aSkewDist = 120, $aDir = SKEW3D_DOWN, $aMinSize = true, $aFillColor = '#FFFFFF', $aQuality = false, $aBorder = false, $aHorizonPos = 0.5)
Severity: Minor
Found in src/image/ImgTrans.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 ShadowRectangle has a boolean flag argument $fcolor, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function ShadowRectangle($xl, $yu, $xr, $yl, $fcolor = false, $shadow_width = 4, $shadow_color = 'darkgray', $useAlpha = true)
Severity: Minor
Found in src/image/Image.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 SetExpired has a boolean flag argument $aFlg, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function SetExpired($aFlg = true)
Severity: Minor
Found in src/image/Image.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 1864.
Open

    public function Stream($aFile = '')
    {
        $this->DoSupersampling();

        $func = 'image' . $this->img_format;
Severity: Minor
Found in src/image/Image.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 123.
Open

    public function PutAndStream($aImage, $aCacheFileName, $aInline, $aStrokeFileName)
    {
        // Check if we should always stroke the image to a file
        if (_FORCE_IMGTOFILE) {
            $aStrokeFileName = _FORCE_IMGDIR . Util\Helper::GenImgName();
Severity: Minor
Found in src/image/ImgStreamCache.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 _TransHor3D has a boolean flag argument $aQuality, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function _TransHor3D($aGdImg, $aHorizon = 100, $aSkewDist = 120, $aDir = SKEW3D_LEFT, $aMinSize = true, $aFillColor = '#FFFFFF', $aQuality = false, $aBorder = false, $aHorizonPos = 0.5)
Severity: Minor
Found in src/image/ImgTrans.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 169.
Open

    public function StreamImgFile($aImage, $aCacheFileName)
    {
        $aCacheFileName = $this->cache_dir . $aCacheFileName;
        if ($fh = @fopen($aCacheFileName, 'rb')) {
            $lock = flock($fh, LOCK_SH);
Severity: Minor
Found in src/image/ImgStreamCache.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 __construct has a boolean flag argument $aSetAutoMargin, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function __construct($aWidth, $aHeight, $a = 0, $aFormat = DEFAULT_GFORMAT, $aSetAutoMargin = true)
Severity: Minor
Found in src/image/RotImage.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

Severity
Category
Status
Source
Language