Showing 235 of 1,765 total issues

The method __construct() has 113 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public function __construct(array $defaults = [])
    {
        if (isset($defaults['request'])) {
            $this->request = $defaults['request'];
            unset($defaults['request']);
Severity: Minor
Found in src/App.php by phpmd

The method __construct() has an NPath complexity of 70400. The configured NPath complexity threshold is 200.
Open

    public function __construct(array $defaults = [])
    {
        if (isset($defaults['request'])) {
            $this->request = $defaults['request'];
            unset($defaults['request']);
Severity: Minor
Found in src/App.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 getTag() has an NPath complexity of 100800. The configured NPath complexity threshold is 200.
Open

    public function getTag(string $tag, array $attr = [], $value = null): string
    {
        $tag = strtolower($tag);
        $tagOrig = $tag;

Severity: Minor
Found in src/App.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 getPaginatorItems() has an NPath complexity of 768. The configured NPath complexity threshold is 200.
Open

    public function getPaginatorItems(): array
    {
        if ($this->page < 1) {
            $this->page = 1;
        } elseif ($this->page > $this->total) {
Severity: Minor
Found in src/Paginator.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 _typecastLoadField() has 103 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    protected function _typecastLoadField(Field $field, $value)
    {
        switch ($field->type) {
            case 'boolean':
                if (is_string($value)) {
Severity: Minor
Found in src/Persistence/Ui.php by phpmd

The method renderView() has an NPath complexity of 576. The configured NPath complexity threshold is 200.
Open

    protected function renderView(): void
    {
        parent::renderView();

        if ($this->cb->canTerminate()) {
Severity: Minor
Found in src/Form/Control/Upload.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 _typecastLoadField() has an NPath complexity of 1260. The configured NPath complexity threshold is 200.
Open

    protected function _typecastLoadField(Field $field, $value)
    {
        switch ($field->type) {
            case 'boolean':
                if (is_string($value)) {
Severity: Minor
Found in src/Persistence/Ui.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 recursiveRender() has an NPath complexity of 419332. The configured NPath complexity threshold is 200.
Open

    protected function recursiveRender(): void
    {
        $labeledControl = $this->inputTemplate->cloneRegion('LabeledControl');
        $noLabelControl = $this->inputTemplate->cloneRegion('NoLabelControl');
        $labeledGroup = $this->inputTemplate->cloneRegion('LabeledGroup');
Severity: Minor
Found in src/Form/Layout.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 renderView() has an NPath complexity of 6480. The configured NPath complexity threshold is 200.
Open

    protected function renderView(): void
    {
        // TODO: I don't think we need the loading state at all
        if ($this->loading) {
            if (!$this->icon) {
Severity: Minor
Found in src/Form/Control/Input.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 addControl() has an NPath complexity of 408. The configured NPath complexity threshold is 200.
Open

    public function addControl(string $name, $control = [], array $fieldSeed = []): Control
    {
        if ($this->form->entity === null) {
            $this->form->setModel((new ProxyModel())->createEntity());
        }
Severity: Minor
Found in src/Form/AbstractLayout.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 _typecastSaveField() has an NPath complexity of 288. The configured NPath complexity threshold is 200.
Open

    protected function _typecastSaveField(Field $field, $value): ?string
    {
        // always normalize string EOL
        if (is_string($value)) {
            $value = preg_replace('~\r?\n|\r~', "\n", $value);
Severity: Minor
Found in src/Persistence/Ui.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 renderView() has an NPath complexity of 336. The configured NPath complexity threshold is 200.
Open

    protected function renderView(): void
    {
        if (!$this->template) {
            throw new Exception('Lister requires you to specify template explicitly');
        }
Severity: Minor
Found in src/Lister.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 on() has 153 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    public function on(string $event, $selector = null, $action = null, array $defaults = [])
    {
        // second argument may be omitted
        if ($selector !== null && !is_string($selector) && ($action === null || is_array($action)) && $defaults === []) {
            $defaults = $action ?? [];
Severity: Minor
Found in src/View.php by phpmd

The method renderView() has an NPath complexity of 576. The configured NPath complexity threshold is 200.
Open

    protected function renderView(): void
    {
        if ($this->size) {
            if (is_int($this->size)) {
                $this->setElement('h' . $this->size);
Severity: Minor
Found in src/Header.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 renderView() has an NPath complexity of 1200. The configured NPath complexity threshold is 200.
Open

    protected function renderView(): void
    {
        if (!$this->columns) {
            throw (new Exception('Table does not have any columns defined'))
                ->addMoreInfo('columns', $this->columns);
Severity: Minor
Found in src/Table.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 renderView() has an NPath complexity of 10368. The configured NPath complexity threshold is 200.
Open

    protected function renderView(): void
    {
        if ($this->element !== 'div') {
            $this->template->set('_element', $this->element);
        } else {
Severity: Minor
Found in src/View.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 getHtml() has an NPath complexity of 324. The configured NPath complexity threshold is 200.
Open

    public function getHtml(): string
    {
        if (!$this->cb->isTriggered()) {
            return '';
        } elseif (!$this->cb->canTerminate()) {
Severity: Minor
Found in src/VirtualPage.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 recursiveRender() has 112 lines of code. Current threshold is set to 100. Avoid really long methods.
Open

    protected function recursiveRender(): void
    {
        $labeledControl = $this->inputTemplate->cloneRegion('LabeledControl');
        $noLabelControl = $this->inputTemplate->cloneRegion('NoLabelControl');
        $labeledGroup = $this->inputTemplate->cloneRegion('LabeledGroup');
Severity: Minor
Found in src/Form/Layout.php by phpmd

The method _setOrAppend() has an NPath complexity of 960. The configured NPath complexity threshold is 200.
Open

    protected function _setOrAppend($tag, ?string $value = null, bool $encodeHtml = true, bool $append = false, bool $throwIfNotFound = true): void
    {
        // $tag passed as associative array [tag => value]
        if (is_array($tag) && $value === null) { // @phpstan-ignore-line
            if ($throwIfNotFound) {
Severity: Minor
Found in src/HtmlTemplate.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 on() has an NPath complexity of 79488. The configured NPath complexity threshold is 200.
Open

    public function on(string $event, $selector = null, $action = null, array $defaults = [])
    {
        // second argument may be omitted
        if ($selector !== null && !is_string($selector) && ($action === null || is_array($action)) && $defaults === []) {
            $defaults = $action ?? [];
Severity: Minor
Found in src/View.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

Severity
Category
Status
Source
Language