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
Open
public function applySort(): void
{
if ($this->sortable === false) {
return;
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Open
public function addConfirmation(string $msg, string $title = 'Closing panel!', ?string $okButton = null, ?string $cancelButton = null): void
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
Open
. number_format($value, max($this->currencyDecimals, $valueDecimals), $this->decimalSeparator, $this->thousandsSeparator);
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
Open
* If you need to format data manually, you can use $this->table->onHook(Lister::HOOK_BEFORE_ROW or Lister::HOOK_AFTER_ROW, ...);
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
Open
$attributePersistence->datetimeFormat = $attributePersistence->dateFormat . ' ' . $attributePersistence->timeFormat;
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
Open
return $this->getApp()->getTag('div', ['class' => 'ui fitted checkbox ' . $this->class], [['input/', ['type' => 'checkbox']]]);
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
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. */
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
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. */
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
Open
* @param array<string, string|bool|array<string>> $attr
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
Open
* @param string|array<int, array{0: string, 1?: array<0|string, string|bool>, 2?: string|array|null}|string>|null $value
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 147 characters Open
Open
$valueDecimals = strlen(preg_replace('~^[^.]$|^.+\.|0+$~s', '', number_format($value, max(0, 11 - (int) log10($value)), '.', '')));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 140 characters Open
Open
$id = $this->getApp()->uiPersistence->typecastAttributeLoadField($this->table->model->getIdField(), $t->stickyGet($this->name));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 156 characters Open
Open
public function jsOpen(array $urlArgs = [], array $dataAttribute = [], ?string $activeCss = null, ?JsExpressionable $jsTrigger = null): JsExpressionable
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 161 characters Open
Open
* @phpstan-type JsCallbackSetClosure \Closure(Jquery, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed): (JsExpressionable|View|string|void)
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 123 characters Open
Open
* @param array $dataAttribute the data attribute name to include in reload from the triggering element
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
Open
if ($field->type === 'atk4_money' && $this->currency !== '' && substr_count($value, $this->currency) === 1) {
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 139 characters Open
Open
return $this->getApp()->getTag($this->tag, ['class' => $this->class . ' atk-handle', 'style' => 'cursor:pointer; color: #bcbdbd']);
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
Open
'loader' => ['selector' => '.ui.loader', 'trigger' => 'active'], // the CSS selector and trigger class to activate loader
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 161 characters Open
Open
* @phpstan-type JsCallbackSetClosure \Closure(Jquery, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed): (JsExpressionable|View|string|void)
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 159 characters Open
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. */
- Create a ticketCreate a ticket
- Exclude checks