diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index be80890692..d27720102a 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -60,7 +60,6 @@ 'use_arrow_functions' => false, 'phpdoc_var_without_name' => false, // remove once https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/6959 is fixed - 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], // remove once PHP CS Fixer is upgraded to v3.17 ]) ->setFinder($finder) ->setCacheFile(sys_get_temp_dir() . '/php-cs-fixer.' . md5(__DIR__) . '.cache'); diff --git a/src/Form/Control.php b/src/Form/Control.php index bf0a5ae102..2341e17197 100644 --- a/src/Form/Control.php +++ b/src/Form/Control.php @@ -146,7 +146,7 @@ protected function renderTemplateToHtml(): string * $control->onChange(new JsExpression('$(this).parents(\'.form\').form(\'submit\')')); * * @param JsExpressionable|JsCallbackSetClosure|array{JsCallbackSetClosure} $expr - * @param array|bool $defaults + * @param array|bool $defaults */ public function onChange($expr, $defaults = []): void { diff --git a/src/Form/Control/Input.php b/src/Form/Control/Input.php index 1c9e38b4de..3ff2c9cc7e 100644 --- a/src/Form/Control/Input.php +++ b/src/Form/Control/Input.php @@ -72,7 +72,7 @@ class Input extends Form\Control /** * Set attribute which is added directly to the tag, not the surrounding
. * - * @param string|int|array $name + * @param string|int|array $name * @param ($name is array ? never : string|int) $value * * @return $this @@ -148,7 +148,7 @@ protected function prepareRenderLabel($label, $spot) * Used only from renderView(). * * @param string|array|Button|UserAction|(AbstractView&ExecutorInterface) $button Button class or object - * @param string $spot Template spot + * @param string $spot Template spot * * @return Button */ diff --git a/src/Grid.php b/src/Grid.php index 13b91cb42b..4afaf72516 100644 --- a/src/Grid.php +++ b/src/Grid.php @@ -144,8 +144,8 @@ protected function initTable(): Table * Add new column to grid. If column with this name already exists, * an. Simply calls Table::addColumn(), so check that method out. * - * @param string|null $name Data model field name - * @param array|Table\Column $columnDecorator + * @param string|null $name Data model field name + * @param array|Table\Column $columnDecorator * @param ($name is null ? array{} : array|Field) $field * * @return Table\Column @@ -462,11 +462,11 @@ public function addFilterColumn($names = null) /** * Add a dropdown menu to header column. * - * @param string $columnName the name of column where to add dropdown - * @param array $items the menu items to add - * @param \Closure(string): (JsExpressionable|View|string|void) $fx the callback function to execute when an item is selected - * @param string $icon the icon - * @param string $menuId the menu ID return by callback + * @param string $columnName the name of column where to add dropdown + * @param array $items the menu items to add + * @param \Closure(string): (JsExpressionable|View|string|void) $fx the callback function to execute when an item is selected + * @param string $icon the icon + * @param string $menuId the menu ID return by callback */ public function addDropdown(string $columnName, $items, \Closure $fx, $icon = 'caret square down', $menuId = null): void { diff --git a/src/HtmlTemplate.php b/src/HtmlTemplate.php index 4e2c5682d1..43f74cf91f 100644 --- a/src/HtmlTemplate.php +++ b/src/HtmlTemplate.php @@ -141,7 +141,7 @@ protected function emptyTagTree(TagTree $tagTree): void * * If tag contains another tag trees, these tag trees are emptied. * - * @param string|array|Model $tag + * @param string|array|Model $tag * @param ($tag is array|Model ? never : string|null) $value */ protected function _setOrAppend($tag, string $value = null, bool $encodeHtml = true, bool $append = false, bool $throwIfNotFound = true): void @@ -207,7 +207,7 @@ protected function _setOrAppend($tag, string $value = null, bool $encodeHtml = t * * would read and set multiple region values from $_GET array. * - * @param string|array|Model $tag + * @param string|array|Model $tag * @param ($tag is array|Model ? never : string|null) $value * * @return $this @@ -223,7 +223,7 @@ public function set($tag, string $value = null): self * Same as set(), but won't generate exception for non-existing * $tag. * - * @param string|array|Model $tag + * @param string|array|Model $tag * @param ($tag is array|Model ? never : string|null) $value * * @return $this @@ -239,7 +239,7 @@ public function trySet($tag, string $value = null): self * Set value of a tag to a HTML content. The value is set without * encoding, so you must be sure to sanitize. * - * @param string|array|Model $tag + * @param string|array|Model $tag * @param ($tag is array|Model ? never : string|null) $value * * @return $this @@ -255,7 +255,7 @@ public function dangerouslySetHtml($tag, string $value = null): self * See dangerouslySetHtml() but won't generate exception for non-existing * $tag. * - * @param string|array|Model $tag + * @param string|array|Model $tag * @param ($tag is array|Model ? never : string|null) $value * * @return $this @@ -270,7 +270,7 @@ public function tryDangerouslySetHtml($tag, string $value = null): self /** * Add more content inside a tag. * - * @param string|array|Model $tag + * @param string|array|Model $tag * @param ($tag is array|Model ? never : string|null) $value * * @return $this @@ -286,7 +286,7 @@ public function append($tag, ?string $value): self * Same as append(), but won't generate exception for non-existing * $tag. * - * @param string|array|Model $tag + * @param string|array|Model $tag * @param ($tag is array|Model ? never : string|null) $value * * @return $this @@ -302,7 +302,7 @@ public function tryAppend($tag, ?string $value): self * Add more content inside a tag. The content is appended without * encoding, so you must be sure to sanitize. * - * @param string|array|Model $tag + * @param string|array|Model $tag * @param ($tag is array|Model ? never : string|null) $value * * @return $this @@ -318,7 +318,7 @@ public function dangerouslyAppendHtml($tag, ?string $value): self * Same as dangerouslyAppendHtml(), but won't generate exception for non-existing * $tag. * - * @param string|array|Model $tag + * @param string|array|Model $tag * @param ($tag is array|Model ? never : string|null) $value * * @return $this diff --git a/src/Js/JsModal.php b/src/Js/JsModal.php index 586f163c70..d53af7a092 100644 --- a/src/Js/JsModal.php +++ b/src/Js/JsModal.php @@ -51,7 +51,7 @@ public function __construct($title, $url, array $args = [], string $dataType = ' * * You can set option individually or supply an array. * - * @param string|array $options + * @param string|array $options * @param ($options is array ? never : mixed) $value * * @return $this diff --git a/src/JsCallback.php b/src/JsCallback.php index 4b6d477f57..e5224a6826 100644 --- a/src/JsCallback.php +++ b/src/JsCallback.php @@ -105,9 +105,9 @@ public function set($fx = null, $args = null) * A proper way to finish execution of AJAX response. Generates JSON * which is returned to frontend. * - * @param string|null $ajaxec - * @param ($success is true ? null : string) $msg General message, typically won't be displayed - * @param bool $success Was request successful or not + * @param string|null $ajaxec + * @param ($success is true ? null : string) $msg General message, typically won't be displayed + * @param bool $success Was request successful or not */ public function terminateAjax($ajaxec, $msg = null, bool $success = true): void { diff --git a/src/Table.php b/src/Table.php index 0928c8d2c9..188045dbfa 100644 --- a/src/Table.php +++ b/src/Table.php @@ -131,8 +131,8 @@ protected function initChunks(): void * If you don't want table column to be associated with model field, then * pass $name parameter as null. * - * @param string|null $name Data model field name - * @param array|Table\Column $columnDecorator + * @param string|null $name Data model field name + * @param array|Table\Column $columnDecorator * @param ($name is null ? array{} : array|Field) $field * * @return Table\Column @@ -304,8 +304,8 @@ public function decoratorFactory(Field $field, $seed = []) * name and size. * * @param \Closure(Jquery, mixed): (JsExpressionable|View|string|void) $fx a callback function with columns widths as parameter - * @param array $widths ex: [100, 200, 300, 100] - * @param array $resizerOptions column-resizer module options, see https://www.npmjs.com/package/column-resizer + * @param array $widths ex: [100, 200, 300, 100] + * @param array $resizerOptions column-resizer module options, see https://www.npmjs.com/package/column-resizer * * @return $this */ diff --git a/src/Table/Column.php b/src/Table/Column.php index 98640cef84..cd5de3f7b4 100644 --- a/src/Table/Column.php +++ b/src/Table/Column.php @@ -127,8 +127,8 @@ public function setHeaderPopupIcon($icon): void * Add a dropdown header menu. * * @param \Closure(string, string): (JsExpressionable|View|string|void) $fx - * @param string $icon - * @param string|null $menuId the menu name + * @param string $icon + * @param string|null $menuId the menu name */ public function addDropdown(array $items, \Closure $fx, $icon = 'caret square down', $menuId = null): void { diff --git a/src/View.php b/src/View.php index 68a802f704..bf90d8bae9 100644 --- a/src/View.php +++ b/src/View.php @@ -410,7 +410,7 @@ public function removeClass($class) * Add inline CSS style to element. * Multiple CSS styles can also be set if passed as array. * - * @param string|array $property + * @param string|array $property * @param ($property is array ? never : string) $value * * @return $this @@ -445,7 +445,7 @@ public function removeStyle($property) /** * Set attribute. * - * @param string|int|array $name + * @param string|int|array $name * @param ($name is array ? never : string|int) $value * * @return $this @@ -772,9 +772,9 @@ public function getHtml() * Will convert calls to jQuery chain into JavaScript string: * $('#view').find('.current').text('abc'); // the text will be JSON encoded to avoid JS injection * - * @param bool|string $when Event when chain will be executed + * @param bool|string $when Event when chain will be executed * @param ($when is false ? null : JsExpressionable|null) $action JavaScript action - * @param string|self|null $selector If you wish to override jQuery($selector) + * @param string|self|null $selector If you wish to override jQuery($selector) * * @return ($action is null ? Jquery : null) */ @@ -953,11 +953,11 @@ public function jsReload($args = [], $afterSuccess = null, $apiConfig = []): JsE * return $js->parent()->hide(); * }); * - * @param string $event JavaScript event + * @param string $event JavaScript event * @param ($action is object ? string : ($action is null ? string : never)|JsExpressionable|JsCallback|JsCallbackSetClosure|array{JsCallbackSetClosure}|UserAction\ExecutorInterface|Model\UserAction) $selector Optional jQuery-style selector - * @param ($selector is string|null ? JsExpressionable|JsCallback|JsCallbackSetClosure|array{JsCallbackSetClosure}|UserAction\ExecutorInterface|Model\UserAction : array) $action code to execute + * @param ($selector is string|null ? JsExpressionable|JsCallback|JsCallbackSetClosure|array{JsCallbackSetClosure}|UserAction\ExecutorInterface|Model\UserAction : array) $action code to execute * - * @return ($selector is null|string ? ($action is null ? Jquery : null) : ($action is null|array ? Jquery : null)) + * @return ($selector is string|null ? ($action is null ? Jquery : null) : ($action is array|null ? Jquery : null)) */ public function on(string $event, $selector = null, $action = null, array $defaults = []) {