YetiForceCompany/YetiForcePDF

View on GitHub
lib/Style/Color.php

Summary

Maintainability
A
25 mins
Test Coverage

Function toRGBA has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static function toRGBA($colorInput, bool $inPDFColorSpace = false): array
    {
        $colorInput = trim(strtolower($colorInput));
        if ($colorInput) {
            if ('#' === $colorInput[0]) {
Severity: Minor
Found in lib/Style/Color.php - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

The method toRGBA() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
Open

    public static function toRGBA($colorInput, bool $inPDFColorSpace = false): array
    {
        $colorInput = trim(strtolower($colorInput));
        if ($colorInput) {
            if ('#' === $colorInput[0]) {
Severity: Minor
Found in lib/Style/Color.php by phpmd

CyclomaticComplexity

Since: 0.1

Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

Example

// Cyclomatic Complexity = 11
class Foo {
1   public function example() {
2       if ($a == $b) {
3           if ($a1 == $b1) {
                fiddle();
4           } elseif ($a2 == $b2) {
                fiddle();
            } else {
                fiddle();
            }
5       } elseif ($c == $d) {
6           while ($c == $d) {
                fiddle();
            }
7        } elseif ($e == $f) {
8           for ($n = 0; $n < $h; $n++) {
                fiddle();
            }
        } else {
            switch ($z) {
9               case 1:
                    fiddle();
                    break;
10              case 2:
                    fiddle();
                    break;
11              case 3:
                    fiddle();
                    break;
                default:
                    fiddle();
                    break;
            }
        }
    }
}

Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

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

    public static function toRGBA($colorInput, bool $inPDFColorSpace = false): array
Severity: Minor
Found in lib/Style/Color.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

Avoid using static access to class '\YetiForcePDF\Math' in method 'toRGBA'.
Open

            $r = $inPDFColorSpace ? Math::div($color[0], '255') : $color[0];
Severity: Minor
Found in lib/Style/Color.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

Avoid using static access to class '\YetiForcePDF\Math' in method 'toRGBA'.
Open

            $g = $inPDFColorSpace ? Math::div($color[1], '255') : $color[1];
Severity: Minor
Found in lib/Style/Color.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

The method fromRGBA uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $alpha = '1';
        }
Severity: Minor
Found in lib/Style/Color.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

Avoid using static access to class '\YetiForcePDF\Math' in method 'toRGBA'.
Open

            $a = $inPDFColorSpace ? Math::div($color[3], '255') : $color[3];
Severity: Minor
Found in lib/Style/Color.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

Avoid using static access to class '\YetiForcePDF\Math' in method 'toRGBA'.
Open

            $b = $inPDFColorSpace ? Math::div($color[2], '255') : $color[2];
Severity: Minor
Found in lib/Style/Color.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

Avoid variables with short names like $b. Configured minimum length is 3.
Open

            $b = substr($color, 2, 1);
Severity: Minor
Found in lib/Style/Color.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $b. Configured minimum length is 3.
Open

            $b = $inPDFColorSpace ? Math::div($color[2], '255') : $color[2];
Severity: Minor
Found in lib/Style/Color.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $a. Configured minimum length is 3.
Open

            $a = 'F';
Severity: Minor
Found in lib/Style/Color.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $r. Configured minimum length is 3.
Open

            $r = substr($color, 0, 1);
Severity: Minor
Found in lib/Style/Color.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $r. Configured minimum length is 3.
Open

            $r = $inPDFColorSpace ? Math::div($color[0], '255') : $color[0];
Severity: Minor
Found in lib/Style/Color.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $g. Configured minimum length is 3.
Open

            $g = $inPDFColorSpace ? Math::div($color[1], '255') : $color[1];
Severity: Minor
Found in lib/Style/Color.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $a. Configured minimum length is 3.
Open

            $a = $inPDFColorSpace ? Math::div($color[3], '255') : $color[3];
Severity: Minor
Found in lib/Style/Color.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $g. Configured minimum length is 3.
Open

            $g = substr($color, 1, 1);
Severity: Minor
Found in lib/Style/Color.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkolivegreen' => '#556b2f',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkred' => '#8b0000',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'floralwhite' => '#fffaf0',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'forestgreen' => '#228b22',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'fuchsia' => '#ff00ff',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'gold' => '#ffd700',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'gray' => '#808080',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkgray' => '#a9a9a9',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'hotpink' => '#ff69b4',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    protected static $colorNames = [
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'aqua' => '#00ffff',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'azure' => '#f0ffff',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'chocolate' => '#d2691e',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'brown' => '#a52a2a',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'firebrick' => '#b22222',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkkhaki' => '#bdb76b',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkslateblue' => '#483d8b',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'dimgrey' => '#696969',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'gainsboro' => '#dcdcdc',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'goldenrod' => '#daa520',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'greenyellow' => '#adff2f',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'chartreuse' => '#7fff00',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'dodgerblue' => '#1e90ff',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'ghostwhite' => '#f8f8ff',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkviolet' => '#9400d3',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'black' => '#000000',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'beige' => '#f5f5dc',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'cornflowerblue' => '#6495ed',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'crimson' => '#dc143c',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'blue' => '#0000ff',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkorchid' => '#9932cc',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'deeppink' => '#ff1493',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkcyan' => '#008b8b',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'honeydew' => '#f0fff0',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkgoldenrod' => '#b8860b',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'ivory' => '#fffff0',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'antiquewhite' => '#faebd7',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'aquamarine' => '#7fffd4',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkgrey' => '#a9a9a9',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkmagenta' => '#8b008b',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkorange' => '#ff8c00',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkslategrey' => '#2f4f4f',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'khaki' => '#f0e68c',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /** @var string[] Color names hash values. */
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'cadetblue' => '#5f9ea0',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'coral' => '#ff7f50',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkblue' => '#00008b',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'grey' => '#808080',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'aliceblue' => '#f0f8ff',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkslategray' => '#2f4f4f',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkturquoise' => '#00ced1',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'indigo' => '#4b0082',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'bisque' => '#ffe4c4',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'blanchedalmond' => '#ffebcd',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkseagreen' => '#8fbc8f',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darkgreen' => '#006400',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'deepskyblue' => '#00bfff',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'darksalmon' => '#e9967a',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'indianred' => '#cd5c5c',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'dimgray' => '#696969',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'blueviolet' => '#8a2be2',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'burlywood' => '#deb887',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'cornsilk' => '#fff8dc',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'cyan' => '#00ffff',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'green' => '#008000',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lemonchiffon' => '#fffacd',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightseagreen' => '#20b2aa',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'linen' => '#faf0e6',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'mediumvioletred' => '#c71585',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'olivedrab' => '#6b8e23',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (3 === \strlen($color)) {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $g = substr($color, 1, 1);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $a = 'F';
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $color = "$r$r$g$g$b$b$a$a";
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param array|string $colorInput
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $r = $inPDFColorSpace ? Math::div($color[0], '255') : $color[0];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return "{$color[0]} {$color[1]} {$color[2]} RG";
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lavenderblush' => '#fff0f5',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'mediumpurple' => '#9370db',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'palegreen' => '#98fb98',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Get rgba array from color name.
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $a = substr($color, 3, 1);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            if ('#' === $colorInput[0]) {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            } elseif (0 === strncmp($colorInput, 'rgb', 3)) {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            }
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $colorInput
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $color = static::toRGBA($colorInput);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'mediumorchid' => '#ba55d3',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'mediumspringgreen' => '#00fa9a',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'navajowhite' => '#ffdead',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'olive' => '#808000',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'sienna' => '#a0522d',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'slategrey' => '#708090',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $r = (string) hexdec(substr($color, 0, 2));
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function toRGBA($colorInput, bool $inPDFColorSpace = false): array
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $g = $inPDFColorSpace ? Math::div($color[1], '255') : $color[1];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * To PDF string.
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lime' => '#00ff00',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'thistle' => '#d8bfd8',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'limegreen' => '#32cd32',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'mediumslateblue' => '#7b68ee',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'mediumturquoise' => '#48d1cc',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /** @var array Color names rgba values. */
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'moccasin' => '#ffe4b5',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    ];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'oldlace' => '#fdf5e6',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'snow' => '#fffafa',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string[]
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'tan' => '#d2b48c',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return static::fromHash(static::$colorNames[$colorName]);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function fromHash(string $hashColor): array
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $b = substr($color, 2, 1);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $color = "$r$r$g$g$b$b$a$a";
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $rgbColor
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                $color = static::fromHash($colorInput);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return [$r, $g, $b, $a];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lawngreen' => '#7cfc00',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'mediumaquamarine' => '#66cdaa',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'midnightblue' => '#191970',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'rebeccapurple' => '#663399',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'red' => '#ff0000',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'steelblue' => '#4682b4',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'transparent' => [0, 0, 0, 0.1]
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $g = substr($color, 1, 1);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $g = (string) hexdec(substr($color, 2, 2));
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $a = (string) hexdec(substr($color, 6, 2));
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Line exceeds 120 characters; contains 142 characters
Open

        preg_match_all('/rgb\(([0-9]+)\s?\,\s?([0-9]+)\s?\,\s?([0-9]+)\s?([0-9]+)?\s?\)/ui', str_replace("\n\t\r ", '', $rgbColor), $matches);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $alpha = '1';
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return [$matches[1][0], $matches[2][0], $matches[3][0], $alpha];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightgoldenrodyellow' => '#fafad2',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightgrey' => '#d3d3d3',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'salmon' => '#fa8072',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'slategray' => '#708090',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'white' => '#ffffff',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string[]
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $color = substr($hashColor, 1);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $r = substr($color, 0, 1);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        } else {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Convert css color definition to rgba values.
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return int[]
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            } elseif (\array_key_exists($colorInput, static::$colorNames)) {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                $color = static::fromName($colorInput);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'skyblue' => '#87ceeb',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $hashColor
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $r = substr($color, 0, 1);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $color .= 'FF';
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Get rgb/a values from css string.
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightblue' => '#add8e6',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'mediumseagreen' => '#3cb371',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'magenta' => '#ff00ff',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'palevioletred' => '#db7093',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'powderblue' => '#b0e0e6',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'paleturquoise' => '#afeeee',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'seashell' => '#fff5ee',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    ];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'peachpuff' => '#ffdab9',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    protected static $colorCustomNames = [
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'pink' => '#ffc0cb',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                $color = static::fromRGBA($colorInput);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'seagreen' => '#2e8b57',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function toPdfString(string $colorInput): string
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'springgreen' => '#00ff7f',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'teal' => '#008080',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'turquoise' => '#40e0d0',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'yellowgreen' => '#9acd32',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $colorName = strtolower($colorName);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (4 === \strlen($color)) {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $b = substr($color, 2, 1);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'mistyrose' => '#ffe4e1',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'rosybrown' => '#bc8f8f',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'violet' => '#ee82ee',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'yellow' => '#ffff00',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $matches = [];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (isset($matches[4]) && '' !== $matches[4][0]) {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if ($colorInput) {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightyellow' => '#ffffe0',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightcoral' => '#f08080',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'maroon' => '#800000',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightskyblue' => '#87cefa',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'palegoldenrod' => '#eee8aa',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'royalblue' => '#4169e1',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'plum' => '#dda0dd',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'sandybrown' => '#f4a460',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'purple' => '#800080',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'slateblue' => '#6a5acd',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return ['0', '0', '0', '1'];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $colorName
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string[] rgb/a
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Convert hash color to rgba values.
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $b = (string) hexdec(substr($color, 4, 2));
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                return static::$colorCustomNames[$colorInput];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $b = $inPDFColorSpace ? Math::div($color[2], '255') : $color[2];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $a = $inPDFColorSpace ? Math::div($color[3], '255') : $color[3];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightcyan' => '#e0ffff',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightslategrey' => '#778899',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'mediumblue' => '#0000cd',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'mintcream' => '#f5fffa',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'navy' => '#000080',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'orange' => '#ffa500',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'silver' => '#c0c0c0',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'tomato' => '#ff6347',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'whitesmoke' => '#f5f5f5',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $alpha = $matches[4][0];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lavender' => '#e6e6fa',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightgreen' => '#90ee90',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightpink' => '#ffb6c1',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'orchid' => '#da70d6',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'saddlebrown' => '#8b4513',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'wheat' => '#f5deb3',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function fromRGBA(string $rgbColor): array
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        preg_match_all('/rgb\(([0-9]+)\s?\,\s?([0-9]+)\s?\,\s?([0-9]+)\s?([0-9]+)?\s?\)/ui', str_replace("\n\t\r ", '', $rgbColor), $matches);
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param bool         $inPDFColorSpace
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $colorInput = trim(strtolower($colorInput));
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            } elseif (isset(static::$colorCustomNames[$colorInput])) {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightgray' => '#d3d3d3',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightsalmon' => '#ffa07a',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightslategray' => '#778899',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'lightsteelblue' => '#b0c4de',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'orangered' => '#ff4500',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'papayawhip' => '#ffefd5',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        'peru' => '#cd853f',
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function fromName(string $colorName): array
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (isset(static::$colorNames[$colorName])) {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (6 === \strlen($color)) {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return [$r, $g, $b, $a];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return [0, 0, 0, 0];
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Style/Color.php by phpcodesniffer

There are no issues that match your filters.

Category
Status