YetiForceCompany/YetiForcePDF

View on GitHub
lib/Layout/ElementBox.php

Summary

Maintainability
F
3 days
Test Coverage

Function fixTables has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring.
Open

    public function fixTables()
    {
        $tables = $this->getBoxesByType('TableWrapperBox');
        foreach ($tables as $tableWrapperBox) {
            $tableBox = $tableWrapperBox->getFirstChild();
Severity: Minor
Found in lib/Layout/ElementBox.php - About 1 day 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 buildTree has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
Open

    public function buildTree($parentBlock = null)
    {
        if ($this->getElement()) {
            $domElement = $this->getElement()->getDOMElement();
        } else {
Severity: Minor
Found in lib/Layout/ElementBox.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

Method fixTables has 90 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function fixTables()
    {
        $tables = $this->getBoxesByType('TableWrapperBox');
        foreach ($tables as $tableWrapperBox) {
            $tableBox = $tableWrapperBox->getFirstChild();
Severity: Major
Found in lib/Layout/ElementBox.php - About 3 hrs to fix

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

    class ElementBox extends Box
    {
        /**
         * @var Element
         */
    Severity: Minor
    Found in lib/Layout/ElementBox.php by phpmd

    Method buildTree has 76 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function buildTree($parentBlock = null)
        {
            if ($this->getElement()) {
                $domElement = $this->getElement()->getDOMElement();
            } else {
    Severity: Major
    Found in lib/Layout/ElementBox.php - About 3 hrs to fix

      Function getBoxesByTagName has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getBoxesByTagName(string $tagName)
          {
              $boxes = [];
              $allChildren = [];
              $this->getAllChildren($allChildren);
      Severity: Minor
      Found in lib/Layout/ElementBox.php - About 1 hr 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 fixTables() has an NPath complexity of 1017. The configured NPath complexity threshold is 200.
      Open

          public function fixTables()
          {
              $tables = $this->getBoxesByType('TableWrapperBox');
              foreach ($tables as $tableWrapperBox) {
                  $tableBox = $tableWrapperBox->getFirstChild();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpmd

      NPathComplexity

      Since: 0.1

      The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

      Example

      class Foo {
          function bar() {
              // lots of complicated code
          }
      }

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

      The method buildTree() has an NPath complexity of 292. The configured NPath complexity threshold is 200.
      Open

          public function buildTree($parentBlock = null)
          {
              if ($this->getElement()) {
                  $domElement = $this->getElement()->getDOMElement();
              } else {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpmd

      NPathComplexity

      Since: 0.1

      The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

      Example

      class Foo {
          function bar() {
              // lots of complicated code
          }
      }

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

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

          public function buildTree($parentBlock = null)
          {
              if ($this->getElement()) {
                  $domElement = $this->getElement()->getDOMElement();
              } else {
      Severity: Minor
      Found in lib/Layout/ElementBox.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 fixTables() has a Cyclomatic Complexity of 21. The configured cyclomatic complexity threshold is 10.
      Open

          public function fixTables()
          {
              $tables = $this->getBoxesByType('TableWrapperBox');
              foreach ($tables as $tableWrapperBox) {
                  $tableBox = $tableWrapperBox->getFirstChild();
      Severity: Minor
      Found in lib/Layout/ElementBox.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 93 to the 15 allowed.
      Open

          public function fixTables()
      Severity: Critical
      Found in lib/Layout/ElementBox.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 37 to the 15 allowed.
      Open

          public function buildTree($parentBlock = null)
      Severity: Critical
      Found in lib/Layout/ElementBox.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

      Missing class import via use statement (line '221', column '19').
      Open

                      $style = (new \YetiForcePDF\Style\Style())
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpmd

      MissingImport

      Since: 2.7.0

      Importing all external classes in a file through use statements makes them clearly visible.

      Example

      function make() {
          return new \stdClass();
      }

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

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

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

                              } else {
                                  $this->appendBlockBox($childDomElement, $element, $style, $parentBlock);
                              }
      Severity: Minor
      Found in lib/Layout/ElementBox.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 fixTables uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

                                  } else {
                                      if (isset($rowSpans[$columnIndex]) && $rowSpans[$columnIndex] > 1) {
                                          if ($rowSpansUp[$columnIndex] < $rowSpans[$columnIndex]) {
                                              ++$rowSpansUp[$columnIndex];
                                              $column->setRowSpanUp($rowSpansUp[$columnIndex]);
      Severity: Minor
      Found in lib/Layout/ElementBox.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 fixTables uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

                                          } else {
                                              $rowSpansUp[$columnIndex] = 0;
                                              $rowSpans[$columnIndex] = 1;
                                          }
      Severity: Minor
      Found in lib/Layout/ElementBox.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 fixTables uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

                  } else {
                      $columnsCount = 0;
                      foreach ($rowGroups as $rowGroup) {
                          if (!$rowGroup->hasChildren()) {
                              $row = $rowGroup->createRowBox();
      Severity: Minor
      Found in lib/Layout/ElementBox.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 buildTree uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

              } else {
                  // tablebox doesn't have element so we can get it from table wrapper (parent box)
                  $domElement = $this->getParent()->getElement()->getDOMElement();
              }
      Severity: Minor
      Found in lib/Layout/ElementBox.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

      Define a constant instead of duplicating this literal "style" 4 times.
      Open

                          if ($childDomElement->hasAttribute('style')) {
      Severity: Critical
      Found in lib/Layout/ElementBox.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.

      Merge this if statement with the enclosing one.
      Open

                      if (isset($child->getElement()->getDOMElement()->tagName)) {
      Severity: Major
      Found in lib/Layout/ElementBox.php by sonar-php

      Merging collapsible if statements increases the code's readability.

      Noncompliant Code Example

      if (condition1) {
        if (condition2) {
          ...
        }
      }
      

      Compliant Solution

      if (condition1 && condition2) {
        ...
      }
      

      Rename "$element" which has the same name as the field declared at line 26.
      Open

                      $element = (new Element())
      Severity: Major
      Found in lib/Layout/ElementBox.php by sonar-php

      Shadowing fields with a local variable is a bad practice that reduces code readability: it makes it confusing to know whether the field or the variable is being used.

      Noncompliant Code Example

      class Foo {
        public $myField;
      
        public function doSomething() {
          $myField = 0;
          ...
        }
      }
      

      See

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

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

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

      Noncompliant Code Example

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

      Compliant Solution

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

      See

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

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

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

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

           * Set element.
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

           * Get element.
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

           * @var Element
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

              return $this->element;
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

          protected $element;
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

           * @param string $tagName
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              $boxes[] = $child;
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          // fix row spans
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                  if ($column->getRowSpan() > 1) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

           * Span all rows.
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

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

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

           * @return array
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

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

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

                      $rowGroup = $tableBox->createRowGroupBox();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              $columns = $row->getChildren();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              $columnsCount = max($columnsCount, \count($columns));
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                          $insertCell = $insertColumn->createCellBox();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                  $tableBox->spanRows();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

          public function buildTree($parentBlock = null)
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                  foreach ($rowGroups as $rowGroup) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                  if (empty($rowGroups)) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                  if ($column->getRowSpan() > 1) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                          $nextRow = $rowGroup->getChildren()[$rowIndex + $i];
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

              $tablesBoxes = $this->getBoxesByType('TableBox');
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          if ($elementTagName && strtolower($elementTagName) === strtolower($tagName)) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

              $tables = $this->getBoxesByType('TableWrapperBox');
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                          $rowChildren = $nextRow->getChildren();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                  $column = $row->createColumnBox();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                              ++$rowSpansUp[$columnIndex];
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                              $column->setRowSpanUp($rowSpansUp[$columnIndex]);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

                  $domElement = $this->getElement()->getDOMElement();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                  // tablebox doesn't have element so we can get it from table wrapper (parent box)
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

          public function setElement(Element $element)
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                  unset($wrapRowGroup);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                      $column = $row->createColumnBox();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              $row = $rowGroup->createRowBox();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                              $nextRow->appendChild($insertColumn);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

                          foreach ($rowGroup->getChildren() as $row) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                      $row->setRowSpanUp(max($row->getRowSpanUp(), 0));
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                      $row->setRowSpan(max($row->getRowSpan(), $column->getRowSpan()));
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                              $rowSpansUp[$columnIndex] = 0;
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

                  $domElement = $this->getParent()->getElement()->getDOMElement();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                      if ($rowGroup instanceof TableRowBox) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          if (!isset($wrapRowGroup)) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          $wrapRowGroup->appendChild($tableBox->removeChild($rowGroup));
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                          $insertColumn = $nextRow->removeChild($nextRow->createColumnBox());
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              $columns = $row->getChildren();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                                          if ($rowSpansUp[$columnIndex] < $rowSpans[$columnIndex]) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                              $row->setRowSpanUp(max($row->getRowSpanUp(), $rowSpansUp[$columnIndex]));
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

           * @return Element
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                      if (isset($child->getElement()->getDOMElement()->tagName)) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

                      $column->createCellBox();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                      foreach ($rowGroups as $rowGroup) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                      $rowSpans = $column->getRowSpan();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                      $rowSpans[$columnIndex] = $column->getRowSpan();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

           * Fix tables - iterate through cells and insert missing one.
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                          if (!$rowGroup->hasChildren()) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                                              $rowSpans[$columnIndex] = 1;
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

              foreach ($tables as $tableWrapperBox) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                  $rowGroups = $tableBox->getChildren();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              $column->createCellBox();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                              $nextRow->insertBefore($insertColumn, $before);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                  $column->createCellBox();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                          $elementTagName = $child->getElement()->getDOMElement()->tagName;
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                              $column = $row->createColumnBox();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

                                      if (isset($rowSpans[$columnIndex]) && $rowSpans[$columnIndex] > 1) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

              return $boxes;
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                  $rowGroups = $tableBox->getChildren();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                      $row = $rowGroup->createRowBox();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                      $columnsCount = 0;
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                      for ($i = 1; $i < $rowSpans; ++$i) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                              $before = $rowChildren[$columnIndex];
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                          $insertColumn->setStyle(clone $column->getStyle());
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              $missing = $columnsCount - \count($columns);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              for ($i = 0; $i < $missing; ++$i) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                      $column->setRowSpanUp(0);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

           * Build tree.
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                              $tableBox->insertBefore($wrapRowGroup, $rowGroup);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                          $insertCell->setStyle(clone $column->getFirstChild()->getStyle());
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              foreach ($row->getChildren() as $columnIndex => $column) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

              foreach ($tablesBoxes as $tableBox) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

           * Get boxes by tag name.
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

          public function getBoxesByTagName(string $tagName)
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

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

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

                              foreach ($columns as $columnIndex => $column) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

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

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

                                      $rowSpansUp[$columnIndex] = 0;
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                              $row->setRowSpan(max($row->getRowSpan(), $column->getRowSpan()));
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                  if ($child instanceof self && $child->getElement() && $child->getElement()->getDOMElement()) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

                  $tableBox = $tableWrapperBox->getFirstChild();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              $wrapRowGroup = $tableBox->removeChild($tableBox->createRowGroupBox());
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          foreach ($rowGroup->getChildren() as $rowIndex => $row) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                          if (isset($rowChildren[$columnIndex])) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          continue;
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

                              if ($childDomElement->hasAttribute('data-header')) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                      // wrap rows with row groups
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

                          foreach ($rowGroup->getChildren() as $row) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

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

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

                              $this->appendTableRowGroupBox($childDomElement, $element, $style, $parentBlock, $display);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              $inline = $this->appendInlineBox($childDomElement, $element, $style, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              // for now only basic style is used - from current element only (with defaults)
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                  $this->appendHeaderBox($childDomElement, $element, $style, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              $tableWrapper = $this->appendTableWrapperBox($childDomElement, $element, $style, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                              } elseif ($childDomElement->hasAttribute('data-footer')) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              } elseif ($childDomElement->hasAttribute('data-barcode')) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          case 'table':
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

                              $this->appendTableCellBox($childDomElement, $element, $style, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              $style->setContent($childDomElement->getAttribute('style'));
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                      $display = $style->getRules('display');
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              } elseif ($childDomElement->hasAttribute('data-font')) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                                  if ('style' === $childDomElement->nodeName) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          $element->attachClasses();
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          case 'table-row':
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                              $style->parseCss($childDomElement->nodeValue);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                  $this->appendBlockBox($childDomElement, $element, $style, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

              if ($domElement->hasChildNodes()) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          } elseif ('style' === $childDomElement->nodeName) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              $this->appendTableRowBox($childDomElement, $element, $style, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                  $this->appendFontBox($childDomElement, $element, $style, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          case 'table-row-group':
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          case 'inline':
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                  foreach ($domElement->childNodes as $childDomElement) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

                                  $this->appendFooterBox($childDomElement, $element, $style, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                  $this->appendBarcodeBox($childDomElement, $element, $style, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          case 'table-header-group':
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                          case 'table-cell':
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                          case 'block':
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              } elseif ($childDomElement->hasAttribute('data-watermark')) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                                  $this->appendWatermarkBox($childDomElement, $element, $style, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                          case 'table-footer-group':
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              if (isset($inline) && $childDomElement instanceof \DOMText) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              case 'none':
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                      $element = (new Element())
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                          ->setDOMElement($childDomElement)
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

                      if ($childDomElement instanceof \DOMComment) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                                      $this->appendStyleBox($childDomElement, $element, $style, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                      $style = (new \YetiForcePDF\Style\Style())
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                          if ($childDomElement->hasAttribute('style')) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

                              $tableWrapper->appendTableBox($childDomElement, $element, $style, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                          case 'inline-block':
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

                      if ($childDomElement instanceof \DOMElement) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

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

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

                              $this->appendInlineBlockBox($childDomElement, $element, $style, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

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

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

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

                                  $inline->setAnonymous(true)->appendText($childDomElement, null, null, $parentBlock);
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 24
      Open

                              case 'none':
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

      Line indented incorrectly; expected 24 spaces, found 28
      Open

                                  if ('style' === $childDomElement->nodeName) {
      Severity: Minor
      Found in lib/Layout/ElementBox.php by phpcodesniffer

      Line indented incorrectly; expected 24 spaces, found 28
      Open

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

      There are no issues that match your filters.

      Category
      Status