Showing 1,763 of 1,765 total issues

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

    public function applySort(): void
    {
        if ($this->sortable === false) {
            return;
        }
Severity: Minor
Found in src/Grid.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

Line exceeds 120 characters; contains 144 characters
Open

    public function addConfirmation(string $msg, string $title = 'Closing panel!', ?string $okButton = null, ?string $cancelButton = null): void
Severity: Minor
Found in src/Panel/Right.php by phpcodesniffer

Line exceeds 120 characters; contains 142 characters
Open

                    . number_format($value, max($this->currencyDecimals, $valueDecimals), $this->decimalSeparator, $this->thousandsSeparator);
Severity: Minor
Found in src/Persistence/Ui.php by phpcodesniffer

Line exceeds 120 characters; contains 133 characters
Open

     * If you need to format data manually, you can use $this->table->onHook(Lister::HOOK_BEFORE_ROW or Lister::HOOK_AFTER_ROW, ...);
Severity: Minor
Found in src/Table/Column.php by phpcodesniffer

Line exceeds 120 characters; contains 124 characters
Open

        $attributePersistence->datetimeFormat = $attributePersistence->dateFormat . ' ' . $attributePersistence->timeFormat;
Severity: Minor
Found in src/Persistence/Ui.php by phpcodesniffer

Line exceeds 120 characters; contains 135 characters
Open

        return $this->getApp()->getTag('div', ['class' => 'ui fitted checkbox ' . $this->class], [['input/', ['type' => 'checkbox']]]);

Line exceeds 120 characters; contains 157 characters
Open

    /** @var array<string, \Closure<T of Model>(T): bool> Callbacks as defined in UserAction->enabled for evaluating row-specific if an action is enabled. */

Line exceeds 120 characters; contains 157 characters
Open

    /** @var array<string, \Closure<T of Model>(T): bool> Callbacks as defined in UserAction->enabled for evaluating row-specific if an action is enabled. */

Line exceeds 120 characters; contains 124 characters
Open

     * @param array<string, string|bool|array<string>>                                                                 $attr
Severity: Minor
Found in src/Table/Column.php by phpcodesniffer

Line exceeds 120 characters; contains 125 characters
Open

     * @param string|array<int, array{0: string, 1?: array<0|string, string|bool>, 2?: string|array|null}|string>|null $value
Severity: Minor
Found in src/Table/Column.php by phpcodesniffer

Line exceeds 120 characters; contains 147 characters
Open

                $valueDecimals = strlen(preg_replace('~^[^.]$|^.+\.|0+$~s', '', number_format($value, max(0, 11 - (int) log10($value)), '.', '')));
Severity: Minor
Found in src/Persistence/Ui.php by phpcodesniffer

Line exceeds 120 characters; contains 140 characters
Open

            $id = $this->getApp()->uiPersistence->typecastAttributeLoadField($this->table->model->getIdField(), $t->stickyGet($this->name));

Line exceeds 120 characters; contains 156 characters
Open

    public function jsOpen(array $urlArgs = [], array $dataAttribute = [], ?string $activeCss = null, ?JsExpressionable $jsTrigger = null): JsExpressionable
Severity: Minor
Found in src/Panel/Right.php by phpcodesniffer

Line exceeds 120 characters; contains 161 characters
Open

 * @phpstan-type JsCallbackSetClosure \Closure(Jquery, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed): (JsExpressionable|View|string|void)

Line exceeds 120 characters; contains 123 characters
Open

     * @param array                 $dataAttribute the data attribute name to include in reload from the triggering element
Severity: Minor
Found in src/Panel/Right.php by phpcodesniffer

Line exceeds 120 characters; contains 129 characters
Open

                    if ($field->type === 'atk4_money' && $this->currency !== '' && substr_count($value, $this->currency) === 1) {
Severity: Minor
Found in src/Persistence/Ui.php by phpcodesniffer

Line exceeds 120 characters; contains 139 characters
Open

        return $this->getApp()->getTag($this->tag, ['class' => $this->class . ' atk-handle', 'style' => 'cursor:pointer; color: #bcbdbd']);

Line exceeds 120 characters; contains 133 characters
Open

            'loader' => ['selector' => '.ui.loader', 'trigger' => 'active'], // the CSS selector and trigger class to activate loader
Severity: Minor
Found in src/Panel/Right.php by phpcodesniffer

Line exceeds 120 characters; contains 161 characters
Open

 * @phpstan-type JsCallbackSetClosure \Closure(Jquery, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed): (JsExpressionable|View|string|void)

Line exceeds 120 characters; contains 159 characters
Open

    /** @var array<'head'|'body'|'foot'|'all', array<string, string|list<string>>> Contains any custom attributes that may be applied on head, body or foot. */
Severity: Minor
Found in src/Table/Column.php by phpcodesniffer
Severity
Category
Status
Source
Language