YetiForceCompany/YetiForcePDF

View on GitHub
lib/Layout/TableRowGroupBox.php

Summary

Maintainability
A
30 mins
Test Coverage

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

        $style = (new \YetiForcePDF\Style\Style())
Severity: Minor
Found in lib/Layout/TableRowGroupBox.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 unused parameters such as '$parentBlock'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$childDomElement'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$style'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$parentBlock'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$style'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$element'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$childDomElement'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$childDomElement'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$element'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$style'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$element'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$parentBlock'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$element'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$childDomElement'.
Open

    public function appendTableRowBox($childDomElement, $element, $style, $parentBlock)
Severity: Minor
Found in lib/Layout/TableRowGroupBox.php by phpmd

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$childDomElement'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$style'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$parentBlock'.
Open

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

UnusedFormalParameter

Since: 0.2

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

Example

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

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

Avoid unused parameters such as '$parentBlock'.
Open

    public function appendTableRowBox($childDomElement, $element, $style, $parentBlock)
Severity: Minor
Found in lib/Layout/TableRowGroupBox.php by phpmd

UnusedFormalParameter

Since: 0.2

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

Example

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

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

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 90.

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

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

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

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

Refactorings

Further Reading

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

     *

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

    {

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

     * @param \YetiForcePDF\Layout\BlockBox $parentBlock

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

    {

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

     */

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

    {

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

     * We shouldn't append table wrapper here.

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

    public function createRowBox()

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

            ->setStyle($style)

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

            ->init();

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

        $box->getStyle()->init();

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

    /**

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

     * @param mixed $parentBlock

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

    /**

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

     * @param mixed $element

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

    /**

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

            ->setContent('')

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

            ->setDocument($this->document)

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

            ->setElement($element)

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

    /**

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

     * @param mixed $childDomElement

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

     */

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

     * @param mixed $element

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

     * We shouldn't append inline box here.

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

    {

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

     * @param Style                         $style

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

    }

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

    /**

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

    public function appendBlockBox($childDomElement, $element, $style, $parentBlock)

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

     * @param mixed $childDomElement

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

    }

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

     */

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

     * @param \DOMNode                      $childDomElement

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

    {

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

    {

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

        $box->getStyle()->init();

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

        return $box;

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

    }

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

     * @param mixed $element

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

    /**

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

     * @param mixed $parentBlock

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

    public function appendTableWrapperBox($childDomElement, $element, $style, $parentBlock)

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

     * @param mixed $parentBlock

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

     * Create row box

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

            ->setDocument($this->document)

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

            ->setParent($this)

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

     * Append table row box element.

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

    public function appendTableRowBox($childDomElement, $element, $style, $parentBlock)

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

     *

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

    {

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

     * return TableRowBox.

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

            ->setDocument($this->document)

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

        $box = (new TableRowBox())

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

        $this->appendChild($box);

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

    }

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

     *

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

     *

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

        $box = (new TableRowBox())

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

        return ''; // not renderable

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

    public function appendInlineBlockBox($childDomElement, $element, $style, $parentBlock)

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

     *

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

     * @param mixed $style

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

        return $box;

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

     * @param Element                       $element

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

     * @param mixed $element

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

     * @param mixed $style

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

     * We shouldn't append inline block box here.

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

     * @param mixed $parentBlock

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

    }

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

            ->init();

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

        $this->appendChild($box);

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

     * @param mixed $style

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

     */

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

    public function getInstructions(): string

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

    }

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

     */

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

    public function appendInlineBox($childDomElement, $element, $style, $parentBlock)

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

            ->setStyle($style)

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

        $box->buildTree($box);

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

     * {@inheritdoc}

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

     *

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

     */

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

        $style = (new \YetiForcePDF\Style\Style())

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

            ->parseInline();

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

     * @param mixed $childDomElement

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

     * @param mixed $style

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

     * @param mixed $childDomElement

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

    /**

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

     * @return $this

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

            ->setParent($this)

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

     * We shouldn't append block box here.

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

     */

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

    }

There are no issues that match your filters.

Category
Status