diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 45453249ea..e734dc9e0a 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -393,6 +393,11 @@ parameters: identifier: method.childParameterType message: '~^Parameter #1 \$fx \(Closure\(Atk4\\Ui\\Js\\Jquery, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed\): \(Atk4\\Ui\\Js\\JsExpressionable\|Atk4\\Ui\\View\|string\|void\)\) of method Atk4\\Ui\\JsCallback::set\(\) should be contravariant with parameter \$fx \(Closure\(mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed\): mixed\) of method Atk4\\Ui\\Callback::set\(\)$~' count: 1 + - + path: 'src/JsCallback.php' + identifier: method.childParameterType + message: '~^Parameter #2 \$args \(array\) of method Atk4\\Ui\\JsCallback::set\(\) should be contravariant with parameter \$fxArgs \(list\) of method Atk4\\Ui\\Callback::set\(\)$~' + count: 1 - path: 'src/Loader.php' identifier: method.childParameterType diff --git a/src/Grid.php b/src/Grid.php index cf867eaf96..8b2e18f625 100644 --- a/src/Grid.php +++ b/src/Grid.php @@ -499,7 +499,7 @@ public function addPopup($columnName, $popup = null, $icon = 'caret square down' * @param string|array|View $button * @param string $title * @param \Closure(View, mixed): void $callback - * @param array $args extra URL argument for callback + * @param array $args extra URL argument for callback * @param bool|\Closure(T): bool $isDisabled * * @return View @@ -528,7 +528,7 @@ private function explodeSelectionValue(string $value): array * * @param string|array|MenuItem $item * @param \Closure(Jquery, list): JsExpressionable $callback - * @param array $args extra URL argument for callback + * @param array $args extra URL argument for callback * * @return View */ @@ -549,7 +549,7 @@ public function addBulkAction($item, \Closure $callback, $args = []) * @param string|array|MenuItem $item * @param string $title * @param \Closure(View, list): void $callback - * @param array $args extra URL argument for callback + * @param array $args extra URL argument for callback * * @return View */ diff --git a/src/Js/JsConditionalForm.php b/src/Js/JsConditionalForm.php index c741634a0d..a2d514d5ac 100644 --- a/src/Js/JsConditionalForm.php +++ b/src/Js/JsConditionalForm.php @@ -32,6 +32,8 @@ public function __construct(Form $form, array $rules = [], string $selector = '. /** * Set field rules for the form. + * + * @param array $rules */ public function setRules(array $rules): void { diff --git a/src/Loader.php b/src/Loader.php index e1ce54c528..e8dcafd8ba 100644 --- a/src/Loader.php +++ b/src/Loader.php @@ -115,8 +115,9 @@ protected function renderView(): void /** * Return a JS action that will trigger the loader to start. * - * @param array $apiConfig - * @param string $storeName + * @param array $args + * @param array $apiConfig + * @param string $storeName * * @return JsChain */ diff --git a/src/Modal.php b/src/Modal.php index eb7b6191f1..773bb279cc 100644 --- a/src/Modal.php +++ b/src/Modal.php @@ -106,7 +106,7 @@ public function enableCallback(): void /** * Add CSS classes to "content" div. * - * @param string|array $class + * @param string|list $class */ public function addContentClass($class): void { @@ -118,6 +118,8 @@ public function addContentClass($class): void * * Example: $button->on('click', $modal->jsShow()); * + * @param array $args + * * @return JsChain */ public function jsShow(array $args = []): JsExpressionable diff --git a/src/Panel/Right.php b/src/Panel/Right.php index e602a875f3..0f5e64e637 100644 --- a/src/Panel/Right.php +++ b/src/Panel/Right.php @@ -91,7 +91,7 @@ public function jsService(): JsChain * Return JS expression need to open panel via JS panelService. * * @param array $urlArgs the argument to include when dynamic content panel open - * @param array $dataAttribute the data attribute name to include in reload from the triggering element + * @param list $dataAttribute the data attribute name to include in reload from the triggering element * @param string|null $activeCss the CSS class name to apply on triggering element when panel is open * @param JsExpressionable $jsTrigger JS expression that trigger panel to open. Default = $(this). */ @@ -108,6 +108,8 @@ public function jsOpen(array $urlArgs = [], array $dataAttribute = [], ?string $ /** * Will reload panel passing args as Get param via JS flyoutService. + * + * @param array $args */ public function jsPanelReload(array $args = []): JsExpressionable { diff --git a/src/Table/Column/ActionButtons.php b/src/Table/Column/ActionButtons.php index 6d7762fbc3..a2a19568b7 100644 --- a/src/Table/Column/ActionButtons.php +++ b/src/Table/Column/ActionButtons.php @@ -82,7 +82,7 @@ public function addButton($button, $action = null, string $confirmMsg = '', $isD * @param string|array $defaults modal title or modal defaults array * @param \Closure(View, mixed): void $callback * @param View $owner - * @param array $args + * @param array $args * @param bool|\Closure(T): bool $isDisabled * * @return View diff --git a/src/View.php b/src/View.php index 26e4f7653a..35d71bb79a 100644 --- a/src/View.php +++ b/src/View.php @@ -936,10 +936,10 @@ public function jsReload($args = [], $afterSuccess = null, array $apiConfig = [] * return $js->parent()->hide(); * }); * - * @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 array $defaults + * @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 array $defaults * * @return ($selector is string|null ? ($action is null ? Jquery : null) : ($action is array|null ? Jquery : null)) */