YetiForceCompany/YetiForcePDF

View on GitHub
lib/Html/Element.php

Summary

Maintainability
A
35 mins
Test Coverage

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

    public function attachClasses()
    {
        if ($this->domElement instanceof \DOMElement && $this->domElement->hasAttribute('class')) {
            $classNames = [];
            foreach (explode(' ', $this->domElement->getAttribute('class')) as $className) {
Severity: Minor
Found in lib/Html/Element.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

Missing class import via use statement (line '167', column '17').
Open

        $style = (new \YetiForcePDF\Style\Style())
Severity: Minor
Found in lib/Html/Element.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

Avoid assigning values to variables in if clauses and the like (line '97', column '8').
Open

    public function getParent()
    {
        if ($this->box) {
            if ($parentBox = $this->box->getParent()) {
                return $parentBox->getElement();
Severity: Minor
Found in lib/Html/Element.php by phpmd

IfStatementAssignment

Since: 2.7.0

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

Example

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

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

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

        } else {
            $this->name = $this->domElement->nodeName;
        }
Severity: Minor
Found in lib/Html/Element.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

Rename "$classNames" which has the same name as the field declared at line 48.
Open

            $classNames = [];
Severity: Major
Found in lib/Html/Element.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

Merge this if statement with the enclosing one.
Open

            if ($parentBox = $this->box->getParent()) {
Severity: Major
Found in lib/Html/Element.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 "$parentBox" which has the same name as the field declared at line 28.
Open

            if ($parentBox = $this->box->getParent()) {
Severity: Major
Found in lib/Html/Element.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

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    public function setBox($box)
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        if ($this->box) {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    protected $box;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        return $this;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    public function getDOMElement()
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    public function getElementId(): string
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * @return self
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Parse element style.
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * @var string
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Get element internal unique id.
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

                    $classNames[] = '.' . $className;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        if ($this->box) {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * @return \YetiForcePDF\Style\Style
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * @var \YetiForcePDF\Document
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

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

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * @return \YetiForcePDF\Html\Box
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

            }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    public function attachClasses()
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

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

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

                return $parentBox->getElement();
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

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

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

     * @return string
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

                if (trim($className)) {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

            ->setContent($styleStr);
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    protected $parentBox;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    protected $domElement;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Set dom element (only for parsing dom tree - domElement should not be used anywhere else).
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * @return \DOMElement
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

                }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

            $this->setClassNames(implode(' ', $classNames));
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    public function init()
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        } else {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    public function getParent()
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        if ($this->domElement instanceof \DOMElement && $this->domElement->hasAttribute('class')) {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

            $styleStr = $this->domElement->getAttribute('style');
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * @var Box
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    protected $classNames = '';
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Initialisation.
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

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

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

     * @return mixed
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Get parent element (from parent box).
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    public function setDOMElement($element): self
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Attach classes.
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

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

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

     * @var Box
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

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

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

            $this->name = $this->domElement->tagName;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

            $this->name = $this->domElement->nodeName;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Set box for this element (element is always inside box).
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        return $this;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

            foreach (explode(' ', $this->domElement->getAttribute('class')) as $className) {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * DOMElement tagName.
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * @var \DOMElement
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Get box.
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        return $this->box;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Get dom element.
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        return $this->domElement;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        return $this;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

            ->setElement($this)
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    protected $document;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Class names for element.
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        return $this->elementId;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    public function parseStyle(): \YetiForcePDF\Style\Style
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        $styleStr = null;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    protected $name;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        $this->box = $box;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * @return \YetiForcePDF\Html\Element
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        $this->domElement = $element;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

            $classNames = [];
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

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

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

     * @var string
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

            }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        $this->attachClasses();
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        if ($this->domElement instanceof \DOMText) {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        parent::init();
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        if (isset($this->domElement->tagName)) {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        return $this;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    public function getBox()
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

            if ($parentBox = $this->box->getParent()) {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        if ($this->domElement instanceof \DOMElement && $this->domElement->hasAttribute('style')) {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * @param string $classNames Class names for element
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        $this->classNames = $classNames;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    public function getStyle(): \YetiForcePDF\Style\Style
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

            return true;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Get element style.
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    {
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        return false;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        return $this->classNames;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * @return \YetiForcePDF\Style\Style
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        return $style->init();
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * @return self
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    public function getClassNames()
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        return $this->style;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    public function isTextNode()
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Get class names for element.
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

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

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

    }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Set class names for element.
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    public function setClassNames(string $classNames)
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

        return $this;
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * @return bool
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     * Is this text node?
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    }
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     */
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

     *
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

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

    /**
Severity: Minor
Found in lib/Html/Element.php by phpcodesniffer

There are no issues that match your filters.

Category
Status