YetiForceCompany/YetiForcePDF

View on GitHub
lib/Layout/LineBox.php

Summary

Maintainability
D
2 days
Test Coverage

Function divide has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

    public function divide()
    {
        $lines = [];
        $line = (new self())
            ->setDocument($this->document)
Severity: Minor
Found in lib/Layout/LineBox.php - About 6 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 LineBox has an overall complexity of 67 which is very high. The configured complexity threshold is 50.
Open

class LineBox extends Box implements BoxInterface
{
    /**
     * Append block box element.
     *
Severity: Minor
Found in lib/Layout/LineBox.php by phpmd

The class LineBox has 14 public methods. Consider refactoring LineBox to keep number of public methods under 10.
Open

class LineBox extends Box implements BoxInterface
{
    /**
     * Append block box element.
     *
Severity: Minor
Found in lib/Layout/LineBox.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

File LineBox.php has 303 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

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

    Function clearStyles has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

        public function clearStyles()
        {
            $allNestedChildren = [];
            $maxLevel = '0';
            foreach ($this->getChildren() as $child) {
    Severity: Minor
    Found in lib/Layout/LineBox.php - About 2 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

    Method divide has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function divide()
        {
            $lines = [];
            $line = (new self())
                ->setDocument($this->document)
    Severity: Major
    Found in lib/Layout/LineBox.php - About 2 hrs to fix

      Method clearStyles has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function clearStyles()
          {
              $allNestedChildren = [];
              $maxLevel = '0';
              foreach ($this->getChildren() as $child) {
      Severity: Minor
      Found in lib/Layout/LineBox.php - About 1 hr to fix

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

            public function getChildrenWidth()
            {
                $width = '0';
                foreach ($this->getChildren() as $childBox) {
                    if ($childBox->isForMeasurement()) {
        Severity: Minor
        Found in lib/Layout/LineBox.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 appendBarcode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            public function appendBarcode($childDomElement, $element, $style, $parentBlock)
            {
                $box = (new BarcodeBox())
                    ->setDocument($this->document)
                    ->setElement($element)
        Severity: Minor
        Found in lib/Layout/LineBox.php - About 25 mins to fix

        Cognitive Complexity

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

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

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

        Further reading

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

            public function clearStyles()
            {
                $allNestedChildren = [];
                $maxLevel = '0';
                foreach ($this->getChildren() as $child) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpmd

        CyclomaticComplexity

        Since: 0.1

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

        Example

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

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

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

            public function divide()
            {
                $lines = [];
                $line = (new self())
                    ->setDocument($this->document)
        Severity: Minor
        Found in lib/Layout/LineBox.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 20 to the 15 allowed.
        Open

            public function clearStyles()
        Severity: Critical
        Found in lib/Layout/LineBox.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

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

            public function divide()
        Severity: Critical
        Found in lib/Layout/LineBox.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 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/LineBox.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/LineBox.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 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/LineBox.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/LineBox.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 divide uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                            } else {
                                $childBox->setForMeasurement(true);
                            }
        Severity: Minor
        Found in lib/Layout/LineBox.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 'getChildrenWidth'.
        Open

                            $width = Math::add($width, $childWidth);
        Severity: Minor
        Found in lib/Layout/LineBox.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::add($top, $this->getStyle()->getRules('margin-top'));
        Severity: Minor
        Found in lib/Layout/LineBox.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 'measureMargins'.
        Open

                        $marginTop = Math::max($marginTop, $child->getStyle()->getRules('margin-top'));
        Severity: Minor
        Found in lib/Layout/LineBox.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 divide uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                        } else {
                            if (!$childBox->containContent()) {
                                // if we doesn't have content and previous element too do not measure me
                                if ($previous = $children[$index - 1]) {
                                    if (!$previous->containContent()) {
        Severity: Minor
        Found in lib/Layout/LineBox.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 '231', column '11').
        Open

            public function divide()
            {
                $lines = [];
                $line = (new self())
                    ->setDocument($this->document)
        Severity: Minor
        Found in lib/Layout/LineBox.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 assigning values to variables in if clauses and the like (line '442', column '9').
        Open

            public function getChildrenWidth()
            {
                $width = '0';
                foreach ($this->getChildren() as $childBox) {
                    if ($childBox->isForMeasurement()) {
        Severity: Minor
        Found in lib/Layout/LineBox.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 'getChildrenWidth'.
        Open

                            $width = Math::add($width, $childBox->getDimensions()->getOuterWidth());
        Severity: Minor
        Found in lib/Layout/LineBox.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 appendInlineBlock uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                } else {
                    $box = (new InlineBlockBox())
                        ->setDocument($this->document)
                        ->setElement($element)
                        ->setParent($this)
        Severity: Minor
        Found in lib/Layout/LineBox.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 'willFit'.
        Open

                return Math::comp(Math::sub($availableSpace, $childrenWidth), $boxWidth) >= 0;
        Severity: Minor
        Found in lib/Layout/LineBox.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 'willFit'.
        Open

                return Math::comp(Math::sub($availableSpace, $childrenWidth), $boxWidth) >= 0;
        Severity: Minor
        Found in lib/Layout/LineBox.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 divide uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                                    } else {
                                        $childBox->setForMeasurement(true);
                                    }
        Severity: Minor
        Found in lib/Layout/LineBox.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 divide uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                                } else {
                                    $childBox->setForMeasurement(true);
                                }
        Severity: Minor
        Found in lib/Layout/LineBox.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 getChildrenWidth uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                        } else {
                            $width = Math::add($width, $childBox->getDimensions()->getOuterWidth());
                        }
        Severity: Minor
        Found in lib/Layout/LineBox.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 divide uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                    } else {
                        $lines[] = $line;
                        $line = (new self())
                            ->setDocument($this->document)
                            ->setParent($this->getParent())
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.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()->setX(Math::add($parent->getCoordinates()->getX(), $this->getOffset()->getLeft()));
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.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 'clearStyles'.
        Open

                    $maxLevel = Math::max($maxLevel, (string) \count($allChildren));
        Severity: Minor
        Found in lib/Layout/LineBox.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 divide uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                        } else {
                            $childBox->setForMeasurement(true);
                        }
        Severity: Minor
        Found in lib/Layout/LineBox.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 'measureMargins'.
        Open

                        $marginBottom = Math::max($marginBottom, $child->getStyle()->getRules('margin-bottom'));
        Severity: Minor
        Found in lib/Layout/LineBox.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::add($previous->getOffset()->getTop(), $previous->getDimensions()->getHeight(), $previous->getStyle()->getRules('margin-bottom'));
        Severity: Minor
        Found in lib/Layout/LineBox.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 "margin-top" 3 times.
        Open

                        $marginTop = Math::max($marginTop, $child->getStyle()->getRules('margin-top'));
        Severity: Critical
        Found in lib/Layout/LineBox.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 "margin-bottom" 3 times.
        Open

                        $marginBottom = Math::max($marginBottom, $child->getStyle()->getRules('margin-bottom'));
        Severity: Critical
        Found in lib/Layout/LineBox.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 "data-barcode" 3 times.
        Open

                if ($childDomElement->hasAttribute('data-barcode') && $childDomElement->getAttribute('data-barcode')) {
        Severity: Critical
        Found in lib/Layout/LineBox.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 "data-height" 3 times.
        Open

                if ($childDomElement->hasAttribute('data-height') && $childDomElement->getAttribute('data-height')) {
        Severity: Critical
        Found in lib/Layout/LineBox.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 "data-code" 3 times.
        Open

                if ($childDomElement->hasAttribute('data-code') && $childDomElement->getAttribute('data-code')) {
        Severity: Critical
        Found in lib/Layout/LineBox.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 "data-size" 3 times.
        Open

                if ($childDomElement->hasAttribute('data-size') && $childDomElement->getAttribute('data-size')) {
        Severity: Critical
        Found in lib/Layout/LineBox.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.

        Avoid unused parameters such as '$childDomElement'.
        Open

            public function appendInline($childDomElement, $element, $style, $parentBlock)
        Severity: Minor
        Found in lib/Layout/LineBox.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 appendInlineBlock($childDomElement, $element, $style, $parentBlock)
        Severity: Minor
        Found in lib/Layout/LineBox.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 appendBarcode($childDomElement, $element, $style, $parentBlock)
        Severity: Minor
        Found in lib/Layout/LineBox.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

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

            public function appendInline($childDomElement, $element, $style, $parentBlock)
            {
                $box = (new InlineBox())
                    ->setDocument($this->document)
                    ->setElement($element)
        Severity: Minor
        Found in lib/Layout/LineBox.php and 1 other location - About 30 mins to fix
        lib/Layout/TableRowGroupBox.php on lines 102..114

        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 90.

        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

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

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

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

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

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

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

             * Append block box element.
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

             * @return \YetiForcePDF\Layout\BlockBox
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

                if ($childDomElement->hasAttribute('data-barcode') && $childDomElement->getAttribute('data-barcode')) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

                return $parentBlock->appendBlock($childDomElement, $element, $style, $parentBlock);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

             * Append table block box element.
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                if ($childDomElement->hasAttribute('data-code') && $childDomElement->getAttribute('data-code')) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

             * Add inline child (and split text to individual characters).
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

             * Is this line empty?  - filled with whitespaces / non measurable elements.
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

             * Append inline block box element.
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

             * Append barcode box element.
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

                        return false;
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                    $box->setType($childDomElement->getAttribute('data-barcode'));
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                    $box->setCode($childDomElement->getAttribute('data-code'));
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                $childrenWidth = $this->getChildrenWidth();
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

             * Remove white spaces.
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

             * @return bool
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

             * @return \YetiForcePDF\Layout\InlineBlockBox
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                if ($childDomElement->hasAttribute('data-height') && $childDomElement->getAttribute('data-height')) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                    $box->setHeight($childDomElement->getAttribute('data-height'));
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

                $boxWidth = $box->getDimensions()->getWidth();
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

             * @return \YetiForcePDF\Layout\BlockBox
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

             * @return \YetiForcePDF\Layout\InlineBlockBox
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                    $boxWidth = $box->getDimensions()->getOuterWidth();
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

                if ($childDomElement->hasAttribute('data-size') && $childDomElement->getAttribute('data-size')) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

            public function appendBlock($childDomElement, $element, $style, $parentBlock)
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                return Math::comp(Math::sub($availableSpace, $childrenWidth), $boxWidth) >= 0;
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                        return false;
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                            if (!$childBox->containContent()) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                                        $childBox->setForMeasurement(true);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

                unset($children);
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

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

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

                return $parentBlock->appendTableBlock($childDomElement, $element, $style, $parentBlock);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        $marginBottom = Math::max($marginBottom, $child->getStyle()->getRules('margin-bottom'));
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                return true;
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

             * Will this box fit in line? (or need to create new one).
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                        if (!$line->containContent()) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

             */
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.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/LineBox.php by phpcodesniffer

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

             * Measure margins.
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                // append last line
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                $lines[] = $line;
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                foreach ($lines as $line) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

                $this->getAllChildren($allChildren, false);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                $box->buildTree($box);
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

                    ->setDocument($this->document)
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

                    if ($line->willFit($childBox)) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                                $childBox->setForMeasurement(true);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                            $line->appendChild($childBox);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                    if ($child instanceof InlineBlockBox) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

                if ('img' === $childDomElement->tagName) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                    if ($child->isForMeasurement() || $child->getStyle()->haveSpacing()) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

             * @return LineBox[]
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                    $isForMeasurement = false;
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                return $lines;
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                    $this->getDimensions()->setHeight('0');
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    $box->setSize($childDomElement->getAttribute('data-size'));
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

                                // if we doesn't have content and previous element too do not measure me
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                            $isForMeasurement = true;
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                    $line->forMeasurement = $isForMeasurement;
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                $style->setRule('margin-top', $marginTop);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

                                        $childBox->setForMeasurement(false);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                        $line->appendChild($childBox);
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

                        $marginTop = Math::max($marginTop, $child->getStyle()->getRules('margin-top'));
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                if ($previous && !$previous->isAbsolute()) {
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

                            $current = $childArray[$row];
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

                    if ($child->containContent()) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                    $child->setForMeasurement(false);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

                        // if this is beginning of the line
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                }
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

                }
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.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/LineBox.php by phpcodesniffer

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

                $this->iterateChildren(function ($child) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                $children = $this->getChildren();
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                        if (!$childBox->containContent()) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                            $childBox->setForMeasurement(false);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                            $childBox->setForMeasurement(true);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

             * @return $this
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

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

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

                        foreach ($cloneArray as $index => $clone) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                $this->getDimensions()->setHeight($lineHeight);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                $top = $parentStyle->getOffsetTop();
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

                    foreach ($allNestedChildren as $childArray) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

                        $child->setForMeasurement(true);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                }, true, false);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                foreach ($children as $index => $childBox) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                                if ($previous = $children[$index - 1]) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                        $lines[] = $line;
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

             * @return $this
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                            $clones[$current->getId()][] = $current;
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

                $width = $dimensions->getWidth();
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Line exceeds 120 characters; contains 154 characters
        Open

                    $top = Math::add($previous->getOffset()->getTop(), $previous->getDimensions()->getHeight(), $previous->getStyle()->getRules('margin-bottom'));
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

             * Divide this line into more lines when objects doesn't fit.
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                                    $childBox->setForMeasurement(true);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

                foreach ($allChildren as $child) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                    $maxLevel = Math::max($maxLevel, (string) \count($allChildren));
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                foreach ($clones as $row => $cloneArray) {
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

                    $child->getAllChildren($allChildren);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                        if (isset($childArray[$row])) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

             * Get children width.
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                    $top = Math::add($previous->getOffset()->getTop(), $previous->getDimensions()->getHeight(), $previous->getStyle()->getRules('margin-bottom'));
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                $top = Math::add($top, $this->getStyle()->getRules('margin-top'));
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

                            if (0 === $index) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if (!$childBox->containContent()) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                                $childBox->setForMeasurement(false);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                $left = $parentStyle->getOffsetLeft();
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

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

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

                        if ($childWidth = $childBox->getDimensions()->getWidth()) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

                    $allNestedChildren[] = $allChildren;
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                for ($row = 0; $row < $maxLevel; ++$row) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                $coordinates = $this->getCoordinates();
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

             * Clear styles
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

                            } elseif ($index === $count - 1) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                            $line->appendChild($childBox);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                                    if (!$previous->containContent()) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

                        if ($child->isForMeasurement()) {
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

                $style->setRule('margin-bottom', $marginBottom);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

             */
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.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/LineBox.php by phpcodesniffer

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

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

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

                            } elseif ($index > 0 && $index < ($count - 1)) {
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                return $this;
        Severity: Minor
        Found in lib/Layout/LineBox.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/LineBox.php by phpcodesniffer

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

                            $width = Math::add($width, $childWidth);
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

                return $width;
        Severity: Minor
        Found in lib/Layout/LineBox.php by phpcodesniffer

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

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

        There are no issues that match your filters.

        Category
        Status