Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Nov 1, 2024
1 parent 04de6ff commit b6a10c5
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 12 deletions.
5 changes: 5 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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<int\|string, Atk4\\Ui\\Js\\JsExpressionable\|string>\) of method Atk4\\Ui\\JsCallback::set\(\) should be contravariant with parameter \$fxArgs \(list<mixed>\) of method Atk4\\Ui\\Callback::set\(\)$~'
count: 1
-
path: 'src/Loader.php'
identifier: method.childParameterType
Expand Down
6 changes: 3 additions & 3 deletions src/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ public function addPopup($columnName, $popup = null, $icon = 'caret square down'
* @param string|array<mixed>|View $button
* @param string $title
* @param \Closure(View, mixed): void $callback
* @param array $args extra URL argument for callback
* @param array<string, string> $args extra URL argument for callback
* @param bool|\Closure<T of Model>(T): bool $isDisabled
*
* @return View
Expand Down Expand Up @@ -528,7 +528,7 @@ private function explodeSelectionValue(string $value): array
*
* @param string|array<mixed>|MenuItem $item
* @param \Closure(Jquery, list<mixed>): JsExpressionable $callback
* @param array $args extra URL argument for callback
* @param array<string, string> $args extra URL argument for callback
*
* @return View
*/
Expand All @@ -549,7 +549,7 @@ public function addBulkAction($item, \Closure $callback, $args = [])
* @param string|array<mixed>|MenuItem $item
* @param string $title
* @param \Closure(View, list<mixed>): void $callback
* @param array $args extra URL argument for callback
* @param array<string, string> $args extra URL argument for callback
*
* @return View
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Js/JsConditionalForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public function __construct(Form $form, array $rules = [], string $selector = '.

/**
* Set field rules for the form.
*
* @param array<string, mixed> $rules
*/
public function setRules(array $rules): void
{
Expand Down
5 changes: 3 additions & 2 deletions src/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ protected function renderView(): void
/**
* Return a JS action that will trigger the loader to start.
*
* @param array<string, mixed> $apiConfig
* @param string $storeName
* @param array<string, string|int> $args
* @param array<string, mixed> $apiConfig
* @param string $storeName
*
* @return JsChain
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function enableCallback(): void
/**
* Add CSS classes to "content" div.
*
* @param string|array $class
* @param string|list<string> $class
*/
public function addContentClass($class): void
{
Expand All @@ -118,6 +118,8 @@ public function addContentClass($class): void
*
* Example: $button->on('click', $modal->jsShow());
*
* @param array<string, string> $args
*
* @return JsChain
*/
public function jsShow(array $args = []): JsExpressionable
Expand Down
4 changes: 3 additions & 1 deletion src/Panel/Right.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function jsService(): JsChain
* Return JS expression need to open panel via JS panelService.
*
* @param array<string, string> $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<string> $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).
*/
Expand All @@ -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<string, string> $args
*/
public function jsPanelReload(array $args = []): JsExpressionable
{
Expand Down
2 changes: 1 addition & 1 deletion src/Table/Column/ActionButtons.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function addButton($button, $action = null, string $confirmMsg = '', $isD
* @param string|array<mixed> $defaults modal title or modal defaults array
* @param \Closure(View, mixed): void $callback
* @param View $owner
* @param array $args
* @param array<string, string> $args
* @param bool|\Closure<T of Model>(T): bool $isDisabled
*
* @return View
Expand Down
8 changes: 4 additions & 4 deletions src/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, mixed>) $action code to execute
* @param array<string, mixed> $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<int|string, mixed>) $action code to execute
* @param array<int|string, mixed> $defaults
*
* @return ($selector is string|null ? ($action is null ? Jquery : null) : ($action is array|null ? Jquery : null))
*/
Expand Down

0 comments on commit b6a10c5

Please sign in to comment.