Skip to content

Commit

Permalink
improve type and fix stan
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Aug 20, 2022
1 parent ae2ee2c commit 47b1d92
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
24 changes: 0 additions & 24 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -485,39 +485,21 @@ parameters:
-
path: 'demos/collection/grid.php'
message: '~^Parameter #1 \$name of method Atk4\\Ui\\Grid::addColumn\(\) expects string, null given\.$~'
-
path: 'demos/data-action/jsactions2.php'
message: '~^Parameter #2 \$selector of method Atk4\\Ui\\View::on\(\) expects Atk4\\Ui\\JsExpressionable\|string\|null, Atk4\\Data\\Model\\UserAction given\.$~'
-
path: 'demos/data-action/jsactionsgrid.php'
message: '~^Parameter #1 \$view of method Atk4\\Ui\\Grid::addActionMenuItem\(\) expects Atk4\\Ui\\View, string given\.$~'
-
path: 'demos/form-control/input2.php'
message: '~^Parameter #1 \$defaults of method Atk4\\Ui\\Form\\Control\\Input::addAction\(\) expects array, string given\.$~'
-
path: 'demos/interactive/sse.php'
message: '~^Parameter #2 \$selector of method Atk4\\Ui\\View::on\(\) expects Atk4\\Ui\\JsExpressionable\|string\|null, array<int, Atk4\\Ui\\Jquery> given\.$~'
-
path: 'demos/interactive/virtual.php'
message: '~^Parameter #1 \$title of class Atk4\\Ui\\JsModal constructor expects string, null given\.$~'
-
path: 'demos/javascript/reloading.php'
message: '~^Parameter #1 \$defaults of method Atk4\\Ui\\Form\\Control\\Input::addAction\(\) expects array, string given\.$~'
-
path: 'demos/layout/layout-panel.php'
message: '~^Parameter #2 \$selector of method Atk4\\Ui\\View::on\(\) expects Atk4\\Ui\\JsExpressionable\|string\|null, array<int, mixed> given\.$~'
-
path: 'demos/layout/layout-panel.php'
message: '~^Parameter #2 \$selector of method Atk4\\Ui\\View::on\(\) expects Atk4\\Ui\\JsExpressionable\|string\|null, Atk4\\Data\\Model\\UserAction given\.$~'
-
path: 'demos/tutorial/actions.php'
message: '~^Parameter #2 \$selector of method Atk4\\Ui\\View::on\(\) expects Atk4\\Ui\\JsExpressionable\|string\|null, Atk4\\Data\\Model\\UserAction given\.$~'
-
path: 'src/Card.php'
message: '~^Parameter #1 \$object of method Atk4\\Ui\\View::add\(\) expects Atk4\\Ui\\View, array<int\|string, \$this\(Atk4\\Ui\\Card\)\|string> given\.$~'
-
path: 'src/Card.php'
message: '~^Parameter #2 \$selector of method Atk4\\Ui\\View::on\(\) expects Atk4\\Ui\\JsExpressionable\|string\|null, Atk4\\Data\\Model\\UserAction given\.$~'
-
path: 'src/Form/Layout/Section.php'
message: '~^Parameter #1 \$object of method Atk4\\Ui\\View::add\(\) expects Atk4\\Ui\\View, array<int\|string, mixed> given\.$~'
Expand All @@ -539,9 +521,6 @@ parameters:
-
path: 'src/JsSearch.php'
message: '~^Parameter #2 \$value of method Atk4\\Ui\\HtmlTemplate::trySet\(\) expects string\|null, Atk4\\Ui\\Form\\Control\\Line given\.$~'
-
path: 'src/Layout/Admin.php'
message: '~^Parameter #2 \$selector of method Atk4\\Ui\\View::on\(\) expects Atk4\\Ui\\JsExpressionable\|string\|null, array<int, Atk4\\Ui\\Jquery> given\.$~'
-
path: 'src/Menu.php'
message: '~^Parameter #1 \$object of method Atk4\\Ui\\View::add\(\) expects Atk4\\Ui\\View, array<int\|string, array<int, string>\|string> given\.$~'
Expand All @@ -551,9 +530,6 @@ parameters:
-
path: 'src/Panel/Right.php'
message: '~^Parameter #1 \$object of method Atk4\\Ui\\AbstractView::add\(\) expects Atk4\\Ui\\AbstractView, array<int\|string, string> given\.$~'
-
path: 'src/UserAction/ModalExecutor.php'
message: '~^Parameter #2 \$selector of method Atk4\\Ui\\View::on\(\) expects Atk4\\Ui\\JsExpressionable\|string\|null, array<int, mixed> given\.$~'

# TODO these rules are generated, this ignores should be fixed in the code
# for level = 6
Expand Down
2 changes: 1 addition & 1 deletion src/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ public function jsReload($args = [], $afterSuccess = null, $apiConfig = [])
* @see http://agile-ui.readthedocs.io/en/latest/js.html
*
* @param string $event JavaScript event
* @param string|View|JsExpressionable|null $selector Optional jQuery-style selector
* @param string|View|JsExpressionable|array|Model\UserAction|null $selector Optional jQuery-style selector
* @param string|JsExpressionable|\Closure|array|UserAction\ExecutorInterface|Model\UserAction|null $action code to execute
* @param array $defaults Options
*
Expand Down

0 comments on commit 47b1d92

Please sign in to comment.