YetiForceCompany/YetiForcePDF

View on GitHub
lib/Layout/InlineBox.php

Summary

Maintainability
D
2 days
Test Coverage

Function appendText has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    public function appendText($childDomElement, $element = null, $style = null, $parentBlock = null)
    {
        $text = $childDomElement->textContent;
        $whiteSpace = $this->getStyle()->getRules('white-space');
        switch ($whiteSpace) {
Severity: Minor
Found in lib/Layout/InlineBox.php - About 4 hrs 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 class InlineBox has 13 public methods. Consider refactoring InlineBox to keep number of public methods under 10.
Open

class InlineBox extends ElementBox implements BoxInterface, BuildTreeInterface, AppendChildInterface
{
    /**
     * @var \YetiForcePDF\Layout\TextBox
     */
Severity: Minor
Found in lib/Layout/InlineBox.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

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

The class InlineBox has an overall complexity of 53 which is very high. The configured complexity threshold is 50.
Open

class InlineBox extends ElementBox implements BoxInterface, BuildTreeInterface, AppendChildInterface
{
    /**
     * @var \YetiForcePDF\Layout\TextBox
     */
Severity: Minor
Found in lib/Layout/InlineBox.php by phpmd

File InlineBox.php has 282 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

declare(strict_types=1);
/**
 * InlineBox class.
Severity: Minor
Found in lib/Layout/InlineBox.php - About 2 hrs to fix

    Method appendText has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function appendText($childDomElement, $element = null, $style = null, $parentBlock = null)
        {
            $text = $childDomElement->textContent;
            $whiteSpace = $this->getStyle()->getRules('white-space');
            switch ($whiteSpace) {
    Severity: Minor
    Found in lib/Layout/InlineBox.php - About 1 hr to fix

      Method addBackgroundColorInstructions has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function addBackgroundColorInstructions(array $element, $pdfX, $pdfY, $width, $height)
      Severity: Minor
      Found in lib/Layout/InlineBox.php - About 35 mins to fix

        Function measureOffset has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function measureOffset(bool $afterPageDividing = false)
            {
                $rules = $this->getStyle()->getRules();
                $parent = $this->getParent();
                $top = $parent->getStyle()->getOffsetTop();
        Severity: Minor
        Found in lib/Layout/InlineBox.php - About 35 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

        Function measureWidth has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function measureWidth(bool $afterPageDividing = false)
            {
                $style = $this->getStyle();
                if ($this->parentWidth === $this->getParent()->getDimensions()->getWidth() && null !== $this->getDimensions()->getWidth()) {
                    if (!$this->isForMeasurement()) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php - About 35 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 appendText() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
        Open

            public function appendText($childDomElement, $element = null, $style = null, $parentBlock = null)
            {
                $text = $childDomElement->textContent;
                $whiteSpace = $this->getStyle()->getRules('white-space');
                switch ($whiteSpace) {
        Severity: Minor
        Found in lib/Layout/InlineBox.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

        Refactor this function to reduce its Cognitive Complexity from 28 to the 15 allowed.
        Open

            public function appendText($childDomElement, $element = null, $style = null, $parentBlock = null)
        Severity: Critical
        Found in lib/Layout/InlineBox.php by sonar-php

        Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

        See

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

            public function measureWidth(bool $afterPageDividing = false)
        Severity: Minor
        Found in lib/Layout/InlineBox.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 measureHeight has a boolean flag argument $afterPageDividing, which is a certain sign of a Single Responsibility Principle violation.
        Open

            public function measureHeight(bool $afterPageDividing = false)
        Severity: Minor
        Found in lib/Layout/InlineBox.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 createText has a boolean flag argument $sameId, which is a certain sign of a Single Responsibility Principle violation.
        Open

            public function createText($content, bool $sameId = false)
        Severity: Minor
        Found in lib/Layout/InlineBox.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 measureOffset has a boolean flag argument $afterPageDividing, which is a certain sign of a Single Responsibility Principle violation.
        Open

            public function measureOffset(bool $afterPageDividing = false)
        Severity: Minor
        Found in lib/Layout/InlineBox.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 measurePosition has a boolean flag argument $afterPageDividing, which is a certain sign of a Single Responsibility Principle violation.
        Open

            public function measurePosition(bool $afterPageDividing = false)
        Severity: Minor
        Found in lib/Layout/InlineBox.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 'measureWidth'.
        Open

                $width = Math::add($width, $style->getHorizontalBordersWidth(), $style->getHorizontalPaddingsWidth());
        Severity: Minor
        Found in lib/Layout/InlineBox.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 'measureOffset'.
        Open

                    $left = Math::add($left, $parent->getStyle()->getOffsetLeft());
        Severity: Minor
        Found in lib/Layout/InlineBox.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 appendText uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                                } else {
                                    $this->createText(' ', true);
                                }
        Severity: Minor
        Found in lib/Layout/InlineBox.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 'measureWidth'.
        Open

                        $this->getDimensions()->setWidth(Math::add($style->getHorizontalBordersWidth(), $style->getHorizontalPaddingsWidth()));
        Severity: Minor
        Found in lib/Layout/InlineBox.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 assigning values to variables in if clauses and the like (line '322', column '7').
        Open

            public function measureOffset(bool $afterPageDividing = false)
            {
                $rules = $this->getStyle()->getRules();
                $parent = $this->getParent();
                $top = $parent->getStyle()->getOffsetTop();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpmd

        IfStatementAssignment

        Since: 2.7.0

        Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

        Example

        class Foo
        {
            public function bar($flag)
            {
                if ($foo = 'bar') { // possible typo
                    // ...
                }
                if ($baz = 0) { // always false
                    // ...
                }
            }
        }

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

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

                } else {
                    $this->appendChild($box);
                }
        Severity: Minor
        Found in lib/Layout/InlineBox.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

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

                } else {
                    $this->appendChild($box);
                    $this->previousTextBox = $box;
                }
        Severity: Minor
        Found in lib/Layout/InlineBox.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 'measurePosition'.
        Open

                $this->getCoordinates()->setX(Math::add($parent->getCoordinates()->getX(), $this->getOffset()->getLeft()));
        Severity: Minor
        Found in lib/Layout/InlineBox.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 createText uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                } else {
                    $box = (new TextBox())
                        ->setDocument($this->document)
                        ->setParent($this)
                        ->init();
        Severity: Minor
        Found in lib/Layout/InlineBox.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 'measureOffset'.
        Open

                    $top = Math::sub($lineHeight, $this->getStyle()->getFont()->getTextHeight());
        Severity: Minor
        Found in lib/Layout/InlineBox.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 appendInlineBlockBox uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                } else {
                    $this->appendChild($box);
                }
        Severity: Minor
        Found in lib/Layout/InlineBox.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 'measureOffset'.
        Open

                    $left = Math::add($left, $previous->getOffset()->getLeft(), $previous->getDimensions()->getWidth(), $previous->getStyle()->getRules('margin-right'));
        Severity: Minor
        Found in lib/Layout/InlineBox.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 'measurePosition'.
        Open

                $this->getCoordinates()->setY(Math::add($parent->getCoordinates()->getY(), $this->getOffset()->getTop()));
        Severity: Minor
        Found in lib/Layout/InlineBox.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 appendTableWrapperBox uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                } else {
                    $this->appendChild($box);
                }
        Severity: Minor
        Found in lib/Layout/InlineBox.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 'measureOffset'.
        Open

                    $top = Math::sub(Math::div($lineHeight, '2'), Math::div($height, '2'));
        Severity: Minor
        Found in lib/Layout/InlineBox.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 'measureHeight'.
        Open

                $this->getDimensions()->setHeight(Math::add($this->getStyle()->getLineHeight(), $this->getStyle()->getVerticalPaddingsWidth()));
        Severity: Minor
        Found in lib/Layout/InlineBox.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 appendText uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                        } else {
                            $this->createText(' ', true);
                        }
        Severity: Minor
        Found in lib/Layout/InlineBox.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

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

                } else {
                    $left = Math::add($left, $parent->getStyle()->getOffsetLeft());
                }
        Severity: Minor
        Found in lib/Layout/InlineBox.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 assigning values to variables in if clauses and the like (line '51', column '7').
        Open

            public function cloneParent(Box $box)
            {
                if ($parent = $this->getParent()) {
                    $clone = clone $this;
                    $clone->getStyle()->setBox($clone);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpmd

        IfStatementAssignment

        Since: 2.7.0

        Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

        Example

        class Foo
        {
            public function bar($flag)
            {
                if ($foo = 'bar') { // possible typo
                    // ...
                }
                if ($baz = 0) { // always false
                    // ...
                }
            }
        }

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

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

                    } else {
                        $parent->appendChild($clone);
                    }
        Severity: Minor
        Found in lib/Layout/InlineBox.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 assigning values to variables in if clauses and the like (line '196', column '23').
        Open

            protected function getPreviousText()
            {
                $closest = $this->getClosestLineBox()->getLastChild();
                $previousTop = $closest->getPrevious();
                if ($previousTop && $textBox = $previousTop->getFirstTextBox()) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpmd

        IfStatementAssignment

        Since: 2.7.0

        Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

        Example

        class Foo
        {
            public function bar($flag)
            {
                if ($foo = 'bar') { // possible typo
                    // ...
                }
                if ($baz = 0) { // always false
                    // ...
                }
            }
        }

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

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

                    $top = Math::sub(Math::div($lineHeight, '2'), Math::div($height, '2'));
        Severity: Minor
        Found in lib/Layout/InlineBox.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 appendInlineBox uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                } else {
                    $this->appendChild($box);
                }
        Severity: Minor
        Found in lib/Layout/InlineBox.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 'measureWidth'.
        Open

                        $width = Math::add($width, $child->getDimensions()->getOuterWidth());
        Severity: Minor
        Found in lib/Layout/InlineBox.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 'measureOffset'.
        Open

                    $top = Math::sub(Math::div($lineHeight, '2'), Math::div($height, '2'));
        Severity: Minor
        Found in lib/Layout/InlineBox.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

        Define a constant instead of duplicating this literal "background-color" 4 times.
        Open

                if ('transparent' !== $rules['background-color']) {
        Severity: Critical
        Found in lib/Layout/InlineBox.php by sonar-php

        Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

        On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

        Noncompliant Code Example

        With the default threshold of 3:

        function run() {
          prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
          execute('action1');
          release('action1');
        }
        

        Compliant Solution

        ACTION_1 = 'action1';
        
        function run() {
          prepare(ACTION_1);
          execute(ACTION_1);
          release(ACTION_1);
        }
        

        Exceptions

        To prevent generating some false-positives, literals having less than 5 characters are excluded.

        Define a constant instead of duplicating this literal "vertical-align" 4 times.
        Open

                if ('bottom' === $rules['vertical-align']) {
        Severity: Critical
        Found in lib/Layout/InlineBox.php by sonar-php

        Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

        On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

        Noncompliant Code Example

        With the default threshold of 3:

        function run() {
          prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
          execute('action1');
          release('action1');
        }
        

        Compliant Solution

        ACTION_1 = 'action1';
        
        function run() {
          prepare(ACTION_1);
          execute(ACTION_1);
          release(ACTION_1);
        }
        

        Exceptions

        To prevent generating some false-positives, literals having less than 5 characters are excluded.

        Add a "case default" clause to this "switch" statement.
        Open

                switch ($whiteSpace) {
        Severity: Critical
        Found in lib/Layout/InlineBox.php by sonar-php

        The requirement for a final case default clause is defensive programming. The clause should either take appropriate action, or contain a suitable comment as to why no action is taken. Even when the switch covers all current values of an enum, a default case should still be used because there is no guarantee that the enum won't be extended.

        Noncompliant Code Example

        switch ($param) {  //missing default clause
          case 0:
            do_something();
            break;
          case 1:
            do_something_else();
            break;
        }
        
        switch ($param) {
          default: // default clause should be the last one
            error();
            break;
          case 0:
            do_something();
            break;
          case 1:
            do_something_else();
            break;
        }
        

        Compliant Solution

        switch ($param) {
          case 0:
            do_something();
            break;
          case 1:
            do_something_else();
            break;
          default:
            error();
            break;
        }
        

        See

        • MISRA C:2004, 15.0 - The MISRA C switch syntax shall be used.
        • MISRA C:2004, 15.3 - The final clause of a switch statement shall be the default clause
        • MISRA C++:2008, 6-4-3 - A switch statement shall be a well-formed switch statement.
        • MISRA C++:2008, 6-4-6 - The final clause of a switch statement shall be the default-clause
        • MISRA C:2012, 16.1 - All switch statements shall be well-formed
        • MISRA C:2012, 16.4 - Every switch statement shall have a default label
        • MISRA C:2012, 16.5 - A default label shall appear as either the first or the last switch label of a switch statement
        • MITRE, CWE-478 - Missing Default Case in Switch Statement
        • CERT, MSC01-C. - Strive for logical completeness
        • CERT, MSC01-CPP. - Strive for logical completeness

        Avoid unused parameters such as '$element'.
        Open

            public function appendText($childDomElement, $element = null, $style = null, $parentBlock = null)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpmd

        UnusedFormalParameter

        Since: 0.2

        Avoid passing parameters to methods or constructors and then not using those parameters.

        Example

        class Foo
        {
            private function bar($howdy)
            {
                // $howdy is not used
            }
        }

        Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

        Avoid unused parameters such as '$parentBlock'.
        Open

            public function appendText($childDomElement, $element = null, $style = null, $parentBlock = null)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpmd

        UnusedFormalParameter

        Since: 0.2

        Avoid passing parameters to methods or constructors and then not using those parameters.

        Example

        class Foo
        {
            private function bar($howdy)
            {
                // $howdy is not used
            }
        }

        Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

        Avoid unused parameters such as '$style'.
        Open

            public function appendText($childDomElement, $element = null, $style = null, $parentBlock = null)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpmd

        UnusedFormalParameter

        Since: 0.2

        Avoid passing parameters to methods or constructors and then not using those parameters.

        Example

        class Foo
        {
            private function bar($howdy)
            {
                // $howdy is not used
            }
        }

        Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

            public function addBackgroundColorInstructions(array $element, $pdfX, $pdfY, $width, $height)
            {
                if ('none' === $this->getStyle()->getRules('display')) {
                    return $element;
                }
        Severity: Major
        Found in lib/Layout/InlineBox.php and 1 other location - About 5 hrs to fix
        lib/Layout/BlockBox.php on lines 724..746

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 192.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            public function appendBlockBox($childDomElement, $element, $style, $parentBlock)
            {
                $box = (new BlockBox())
                    ->setDocument($this->document)
                    ->setParent($this)
        Severity: Major
        Found in lib/Layout/InlineBox.php and 2 other locations - About 1 hr to fix
        lib/Layout/InlineBox.php on lines 117..135
        lib/Layout/InlineBox.php on lines 140..156

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 116.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            public function appendInlineBlockBox($childDomElement, $element, $style, $parentBlock)
            {
                $box = (new InlineBlockBox())
                    ->setDocument($this->document)
                    ->setParent($this)
        Severity: Major
        Found in lib/Layout/InlineBox.php and 2 other locations - About 1 hr to fix
        lib/Layout/InlineBox.php on lines 71..89
        lib/Layout/InlineBox.php on lines 140..156

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 116.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

            public function appendInlineBox($childDomElement, $element, $style, $parentBlock)
            {
                $box = (new self())
                    ->setDocument($this->document)
                    ->setParent($this)
        Severity: Major
        Found in lib/Layout/InlineBox.php and 2 other locations - About 1 hr to fix
        lib/Layout/InlineBox.php on lines 71..89
        lib/Layout/InlineBox.php on lines 117..135

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 116.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

             * @var string
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $box = (new BlockBox())
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                } else {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if (isset($this->getChildren()[0])) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * Parent width cache.
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $this->appendChild($box);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $clone->getDimensions()->setBox($clone);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $clone->getCoordinates()->setBox($clone);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setElement($element)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->init();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                return $box;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @var \YetiForcePDF\Layout\TextBox
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            protected $parentWidth = '0';
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $clone->getStyle()->setBox($clone);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        $parent->cloneParent($clone);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setStyle($style)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $box->getStyle()->init();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function cloneParent(Box $box)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setStyle($style)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $this->cloneParent($box);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * Parent height cache.
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * Go up to Line box and clone and wrap element.
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if (isset($this->getChildren()[0])) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $box->buildTree($box);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $clone->getElement()->setBox($clone);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setParent($this)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                // so we need to wrap this box later and split lines at block element
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                // if we add this child to parent box we loose parent inline styles if nested
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if ($parent = $this->getParent()) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                return $box;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setParent($this)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setElement($element)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->init();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @return Box
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function appendBlockBox($childDomElement, $element, $style, $parentBlock)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $clone = clone $this;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    } else {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $this->cloneParent($box);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * {@inheritdoc}
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                // so we need to wrap this box later and split lines at block element
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * {@inheritdoc}
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            protected $previousTextBox;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @var string
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setDocument($this->document)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @param Box $box
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    if (!$parent instanceof LineBox) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                // if we add this child to parent box we loose parent inline styles if nested
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setDocument($this->document)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        $parent->appendChild($clone);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function appendTableWrapperBox($childDomElement, $element, $style, $parentBlock)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $box = (new TableWrapperBox())
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            protected $parentHeight = '0';
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $clone->getOffset()->setBox($clone);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $clone->appendChild($box);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                } else {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if (isset($this->getChildren()[0])) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                } else {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $box->buildTree($parentBlock);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                } else {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @param \DOMNode                           $childDomElement
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @return $this
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $box = (new InlineBlockBox())
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $this->appendChild($box);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * {@inheritdoc}
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $box->getStyle()->init();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        ->init();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if (isset($this->getChildren()[0])) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $this->appendChild($box);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        break;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                                    $parent = $this->getParent();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $style = $this->getStyle();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                // if we add this child to parent box we loose parent inline styles if nested
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setDocument($this->document)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if ($sameId && $this->previousTextBox) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    return $textBox->getText();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                                    $anonymous = ($parent instanceof self && $parent->isAnonymous()) || $parent instanceof LineBox;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

        Line exceeds 120 characters; contains 123 characters
        Open

                                    $anonymous = ($parent instanceof self && $parent->isAnonymous()) || $parent instanceof LineBox;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        } else {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * Create text.
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @param bool $sameId
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                switch ($whiteSpace) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    if ('normal' === $whiteSpace) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        $words = preg_split('/ /u', $text, 0);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                                    if ($index + 1 !== $count || $anonymous) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setElement($element)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setStyle($style)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if (isset($this->getChildren()[0])) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $this->appendChild($box);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $box = (new self())
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setDocument($this->document)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $box->buildTree($box);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @param Element                            $element
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                return $box;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $text = $childDomElement->textContent;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @return $this
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                } else {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $box->setText($content);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        $text = preg_replace('/ +/u', ' ', $text);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    } elseif ('nowrap' === $whiteSpace) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function measureWidth(bool $afterPageDividing = false)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $this->previousTextBox = $this->cloneParent($box);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * Get previous sibling inline-level element text.
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @param Style                              $style
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        $text = preg_replace('/([\t ]+)?\r([\t ]+)?/u', "\r", $text);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        if ($count) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                                    $this->createText(' ', true);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->init();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                // so we need to wrap this box later and split lines at block element
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setParent($this)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $this->appendChild($box);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $box = $this->previousTextBox->clone();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        ->setParent($this)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if ($previousTop && $textBox = $previousTop->getFirstTextBox()) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @param \YetiForcePDF\Layout\BlockBox|null $parentBlock
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if ('' !== $text) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                                    }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setParent($this)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $this->cloneParent($box);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function appendInlineBox($childDomElement, $element, $style, $parentBlock)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @return $this
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    case 'nowrap':
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        $text = preg_replace('/\r+/u', ' ', $text);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $box = (new TextBox())
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                                if ('' !== $word) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->previousTextBox = $box;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        $this->createText($text, true);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                return $this;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function appendText($childDomElement, $element = null, $style = null, $parentBlock = null)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                            foreach ($words as $index => $word) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                } else {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @param bool $afterPageDividing
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                // we don't want to build tree from here - we will build it from TableBox
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                return $box;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @param $content
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $closest = $this->getClosestLineBox()->getLastChild();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * Add text.
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                                        $this->createText(' ', true);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * {@inheritdoc}
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $this->cloneParent($box);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                return $box;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $previousTop = $closest->getPrevious();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        $count = \count($words);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                                } else {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function createText($content, bool $sameId = false)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $this->previousTextBox = $box;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                return $box;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            protected function getPreviousText()
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if ($this->parentWidth === $this->getParent()->getDimensions()->getWidth() && null !== $this->getDimensions()->getWidth()) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $box->getStyle()->init();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function appendInlineBlockBox($childDomElement, $element, $style, $parentBlock)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setElement($element)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->init();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        ->setDocument($this->document)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $whiteSpace = $this->getStyle()->getRules('white-space');
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * Measure width.
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $box->getStyle()->init();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ->setStyle($style)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @return string|null
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    case 'normal':
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        $text = preg_replace('/\t+/u', ' ', $text);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                                    $this->createText($word);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                            $this->createText(' ', true);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                // margin top inside inline and inline block doesn't affect relative to line top position
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @param bool $afterPageDividing
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->style = clone $this->style;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $graphicStateStr = '/' . $graphicState->getNumber() . ' gs';
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    ];
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        $this->getDimensions()->setWidth(Math::add($style->getHorizontalBordersWidth(), $style->getHorizontalPaddingsWidth()));
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->getDimensions()->setWidth($width);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function measureOffset(bool $afterPageDividing = false)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $height = $this->getStyle()->getFont()->getTextHeight();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $left = Math::add($left, $previous->getOffset()->getLeft(), $previous->getDimensions()->getWidth(), $previous->getStyle()->getRules('margin-right'));
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $parent = $this->getParent();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function __clone()
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

        Line exceeds 120 characters; contains 132 characters
        Open

                if ($this->parentWidth === $this->getParent()->getDimensions()->getWidth() && null !== $this->getDimensions()->getWidth()) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->coordinates = clone $this->coordinates;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->children = [];
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function measureHeight(bool $afterPageDividing = false)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $dimensions = $this->getDimensions();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->dimensions->setBox($this);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $parent = $this->getClosestLineBox();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $child->measurePosition($afterPageDividing);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        'f',
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    if (!$this->isForMeasurement()) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $child->measureHeight($afterPageDividing);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $parent = $this->getParent();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $top = $this->getStyle()->getFont()->getDescender();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if ($previous = $this->getPrevious()) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->offset = clone $this->offset;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $lineHeight = $this->getClosestLineBox()->getDimensions()->getHeight();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $top = Math::sub(Math::div($lineHeight, '2'), Math::div($height, '2'));
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->element = clone $this->element;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $rules = $this->style->getRules();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if ('transparent' !== $rules['background-color']) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $element = $this->addBorderInstructions($element, $pdfX, $pdfY, $width, $height);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->applyStyleHeight();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * Position.
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @return $this
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                foreach ($this->getChildren() as $child) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->style->setBox($this);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $graphicState = $this->style->getGraphicState();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        'Q',
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if ($this->isForMeasurement()) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if ('bottom' === $rules['vertical-align']) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                return $this;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $width = '0';
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->dimensions = clone $this->dimensions;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        'q',
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $width = Math::add($width, $style->getHorizontalBordersWidth(), $style->getHorizontalPaddingsWidth());
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                } elseif ('top' === $rules['vertical-align']) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * Get element PDF instructions to use in content stream.
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $element = [];
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                // it only affects line margins
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->parentWidth = $this->getParent()->getDimensions()->getWidth();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

        Line exceeds 120 characters; contains 161 characters
        Open

                    $left = Math::add($left, $previous->getOffset()->getLeft(), $previous->getDimensions()->getWidth(), $previous->getStyle()->getRules('margin-right'));
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        $width = Math::add($width, $child->getDimensions()->getOuterWidth());
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->getOffset()->setLeft($left);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                return implode("\n", $element);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function measurePosition(bool $afterPageDividing = false)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        "0 0 $width $height re",
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $pdfY = $coordinates->getPdfY();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $height = $dimensions->getHeight();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * Measure height.
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $top = $parent->getStyle()->getOffsetTop();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $child->measureOffset($afterPageDividing);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * Position.
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->getCoordinates()->setX(Math::add($parent->getCoordinates()->getX(), $this->getOffset()->getLeft()));
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->getCoordinates()->setY(Math::add($parent->getCoordinates()->getY(), $this->getOffset()->getTop()));
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        "1 0 0 1 $pdfX $pdfY cm",
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        "{$rules['background-color'][0]} {$rules['background-color'][1]} {$rules['background-color'][2]} rg",
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @return string
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $pdfX = $coordinates->getPdfX();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                foreach ($this->getChildren() as $child) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                if ('none' === $this->getStyle()->getRules('display')) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $bgColor = [
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $element = array_merge($element, $bgColor);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function getInstructions(): string
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $width = $dimensions->getWidth();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

        Line exceeds 120 characters; contains 135 characters
        Open

                        $this->getDimensions()->setWidth(Math::add($style->getHorizontalBordersWidth(), $style->getHorizontalPaddingsWidth()));
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    foreach ($this->getChildren() as $child) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @param bool $afterPageDividing
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->getDimensions()->setHeight(Math::add($this->getStyle()->getLineHeight(), $this->getStyle()->getVerticalPaddingsWidth()));
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                return $this;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $top = Math::sub($lineHeight, $this->getStyle()->getFont()->getTextHeight());
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                return $this;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

        Line exceeds 120 characters; contains 136 characters
        Open

                $this->getDimensions()->setHeight(Math::add($this->getStyle()->getLineHeight(), $this->getStyle()->getVerticalPaddingsWidth()));
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @return $this
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    return $element;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        $graphicStateStr,
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                        $child->measureWidth($afterPageDividing);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->applyStyleWidth();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @return $this
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             * @param bool $afterPageDividing
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $rules = $this->getStyle()->getRules();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                } else {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->coordinates->setBox($this);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $coordinates = $this->getCoordinates();
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    return $this;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                return $this;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                } elseif ('middle' === $rules['vertical-align'] || 'baseline' === $rules['vertical-align']) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $left = (string) $rules['margin-left'];
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                    $left = Math::add($left, $parent->getStyle()->getOffsetLeft());
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->getOffset()->setTop($top);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                foreach ($this->getChildren() as $child) {
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->element->setBox($this);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $this->offset->setBox($this);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

            public function addBackgroundColorInstructions(array $element, $pdfX, $pdfY, $width, $height)
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                return $element;
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

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

                $element = $this->addBackgroundColorInstructions($element, $pdfX, $pdfY, $width, $height);
        Severity: Minor
        Found in lib/Layout/InlineBox.php by phpcodesniffer

        There are no issues that match your filters.

        Category
        Status