Skip to content

Commit

Permalink
fix some phpdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Dec 9, 2023
1 parent ba27cf3 commit 14516a9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 84 deletions.
2 changes: 1 addition & 1 deletion Database/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function __construct($dbHost, $type, $table = null)
protected $_offset;

/**
* @var string
* @var bool
*
* @internal
*/
Expand Down
24 changes: 12 additions & 12 deletions Editor/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<IOption[]>|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)
*/
Expand Down Expand Up @@ -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
*
Expand All @@ -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<IOption[]>|bool
* @return array|bool
*
* @internal
*/
Expand Down
72 changes: 1 addition & 71 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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\\<int, mixed\\> given\\.$#"
count: 1
path: Editor.php

-
message: "#^Parameter \\#4 \\$fields of method DataTables\\\\Editor\\\\Field\\:\\:searchBuilderOptionsExec\\(\\) expects array\\<DataTables\\\\Field\\>, array\\<DataTables\\\\Editor\\\\Field\\> 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
Expand Down Expand Up @@ -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\\<array\\<DataTables\\\\Editor\\\\IOption\\>\\> but returns array\\.$#"
count: 1
path: Editor/Field.php

-
message: "#^Method DataTables\\\\Editor\\\\Field\\:\\:xssSafety\\(\\) should return string but returns array\\<int, mixed\\>\\.$#"
count: 1
Expand All @@ -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
Expand Down

0 comments on commit 14516a9

Please sign in to comment.