diff --git a/Database/Query.php b/Database/Query.php index 0f50302..c68be20 100644 --- a/Database/Query.php +++ b/Database/Query.php @@ -143,7 +143,7 @@ public function __construct($dbHost, $type, $table = null) protected $_offset; /** - * @var string + * @var bool * * @internal */ diff --git a/Editor/Field.php b/Editor/Field.php index 050c0f7..9980bac 100644 --- a/Editor/Field.php +++ b/Editor/Field.php @@ -369,7 +369,7 @@ public function searchPaneOptions($spInput = null) /** * Get a list of values that can be used for the options list in SearchBuilder. * - * @param SearchBuilderOptions|callable(Database, DataTables\Editor): (Promise|bool) $sbInput SearchBuilderOptions instance or a closure function if providing a method + * @param SearchBuilderOptions|callable(Database, DataTables\Editor): (array|bool) $sbInput SearchBuilderOptions instance or a closure function if providing a method * * @return ($sbInput is null ? SearchBuilderOptions|null : $this) */ @@ -627,11 +627,11 @@ public function optionsExec($db) * Execute the spopts to get the list of options for SearchPanes to return * to the client-side. * - * @param Editor\Field $field The field to retrieve the data from - * @param Editor $editor The editor instance - * @param array $http The http request sent to the server - * @param Editor\Field[] $fields All of the fields - * @param array $leftJoin Info for a leftJoin if required + * @param self $field The field to retrieve the data from + * @param Editor $editor The editor instance + * @param array $http The http request sent to the server + * @param self[] $fields All of the fields + * @param array $leftJoin Info for a leftJoin if required * * @return array|bool * @@ -654,13 +654,13 @@ public function searchPaneOptionsExec($field, $editor, $http, $fields, $leftJoin * Execute the spopts to get the list of options for SearchBuilder to return * to the client-side. * - * @param DataTables\Field $field The field to retrieve the data from - * @param DataTables\Editor $editor The editor instance - * @param DataTables\DTRequest $http The http request sent to the server - * @param DataTables\Field[] $fields All of the fields - * @param any $leftJoin Info for a leftJoin if required + * @param self $field The field to retrieve the data from + * @param Editor $editor The editor instance + * @param array $http The http request sent to the server + * @param self[] $fields All of the fields + * @param array $leftJoin Info for a leftJoin if required * - * @return Promise|bool + * @return array|bool * * @internal */ diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 5707d29..3e26622 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -86,12 +86,7 @@ parameters: path: Database/Query.php - - message: "#^Property DataTables\\\\Database\\\\Query\\:\\:\\$_distinct \\(string\\) does not accept bool\\.$#" - count: 1 - path: Database/Query.php - - - - message: "#^Property DataTables\\\\Database\\\\Query\\:\\:\\$_distinct \\(string\\) does not accept default value of type false\\.$#" + message: "#^Negated boolean expression is always false\\.$#" count: 1 path: Database/Query.php @@ -150,11 +145,6 @@ parameters: count: 8 path: Editor.php - - - message: "#^Parameter \\#1 \\$field of method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptionsExec\\(\\) expects DataTables\\\\Field, DataTables\\\\Editor\\\\Field given\\.$#" - count: 1 - path: Editor.php - - message: "#^Parameter \\#1 \\$id of method DataTables\\\\Editor\\:\\:_insert_or_update\\(\\) expects int\\|string, null given\\.$#" count: 1 @@ -175,26 +165,11 @@ parameters: count: 1 path: Editor.php - - - message: "#^Parameter \\#3 \\$http of method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptionsExec\\(\\) expects DataTables\\\\DTRequest, array\\|null given\\.$#" - count: 1 - path: Editor.php - - message: "#^Parameter \\#3 \\$pkey of method DataTables\\\\Editor\\:\\:_remove_table\\(\\) expects string\\|null, array\\ given\\.$#" count: 1 path: Editor.php - - - message: "#^Parameter \\#4 \\$fields of method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptionsExec\\(\\) expects array\\, array\\ given\\.$#" - count: 1 - path: Editor.php - - - - message: "#^Parameter \\#5 \\$leftJoin of method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptionsExec\\(\\) expects DataTables\\\\Editor\\\\any, array given\\.$#" - count: 1 - path: Editor.php - - message: "#^Property DataTables\\\\Editor\\:\\:\\$_db is never written, only read\\.$#" count: 1 @@ -255,21 +230,6 @@ parameters: count: 1 path: Editor.php - - - message: "#^Method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptionsExec\\(\\) has invalid return type DataTables\\\\Editor\\\\IOption\\.$#" - count: 1 - path: Editor/Field.php - - - - message: "#^Method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptionsExec\\(\\) has invalid return type DataTables\\\\Editor\\\\Promise\\.$#" - count: 1 - path: Editor/Field.php - - - - message: "#^Method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptionsExec\\(\\) should return bool\\|DataTables\\\\Editor\\\\Promise\\\\> but returns array\\.$#" - count: 1 - path: Editor/Field.php - - message: "#^Method DataTables\\\\Editor\\\\Field\\:\\:xssSafety\\(\\) should return string but returns array\\\\.$#" count: 1 @@ -280,36 +240,6 @@ parameters: count: 1 path: Editor/Field.php - - - message: "#^Parameter \\$field of method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptionsExec\\(\\) has invalid type DataTables\\\\Field\\.$#" - count: 1 - path: Editor/Field.php - - - - message: "#^Parameter \\$fields of method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptionsExec\\(\\) has invalid type DataTables\\\\Field\\.$#" - count: 1 - path: Editor/Field.php - - - - message: "#^Parameter \\$http of method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptionsExec\\(\\) has invalid type DataTables\\\\DTRequest\\.$#" - count: 1 - path: Editor/Field.php - - - - message: "#^Parameter \\$leftJoin of method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptionsExec\\(\\) has invalid type DataTables\\\\Editor\\\\any\\.$#" - count: 1 - path: Editor/Field.php - - - - message: "#^Parameter \\$sbInput of method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptions\\(\\) has invalid type DataTables\\\\Editor\\\\IOption\\.$#" - count: 1 - path: Editor/Field.php - - - - message: "#^Parameter \\$sbInput of method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptions\\(\\) has invalid type DataTables\\\\Editor\\\\Promise\\.$#" - count: 1 - path: Editor/Field.php - - message: "#^Property DataTables\\\\Editor\\\\Field\\:\\:\\$_getFormatter is never written, only read\\.$#" count: 1