Skip to content

Commit

Permalink
Fix PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jun 8, 2024
1 parent f367925 commit a624a76
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 23 deletions.
8 changes: 4 additions & 4 deletions Editor/Join.php
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,10 @@ public function whereSet($_ = null)
/**
* Get data.
*
* @param Editor $editor Host Editor instance
* @param string[] $data Data from the parent table's get and were we need
* to add out output.
* @param array $options options array for fields
* @param Editor $editor Host Editor instance
* @param mixed[] $data Data from the parent table's get and were we need
* to add out output.
* @param array $options options array for fields
*
* @internal
*/
Expand Down
4 changes: 1 addition & 3 deletions Editor/Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -699,10 +699,8 @@ private function _dbExec($upload, $db)
$q->set($column, $webPath);
} elseif ($type === self::DB_SYSTEM_PATH) {
$q->set($column, $path);
} elseif (is_string($type)) {
$q->set($column, str_replace('__ID__', $id, $type));
} else {
$q->set($column, $type);
$q->set($column, str_replace('__ID__', $id, $type));
}
}

Expand Down
15 changes: 0 additions & 15 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -340,26 +340,11 @@ parameters:
count: 1
path: Editor/Join.php

-
message: "#^Offset 'DT_RowId' does not exist on string\\.$#"
count: 1
path: Editor/Join.php

-
message: "#^Parameter \\#1 \\$order of method DataTables\\\\Database\\\\Query\\:\\:order\\(\\) expects array\\<string\\>\\|string, DataTables\\\\Editor\\\\Join given\\.$#"
count: 1
path: Editor/Join.php

-
message: "#^Parameter \\#2 \\$data of method DataTables\\\\Ext\\:\\:_propExists\\(\\) expects array, string given\\.$#"
count: 2
path: Editor/Join.php

-
message: "#^Parameter \\#2 \\$data of method DataTables\\\\Ext\\:\\:_readProp\\(\\) expects array, string given\\.$#"
count: 1
path: Editor/Join.php

-
message: "#^Parameter \\#2 \\$val of method DataTables\\\\Database\\\\Query\\:\\:set\\(\\) expects string\\|null, int given\\.$#"
count: 2
Expand Down
1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ parameters:
- '~has no return type specified~'
- '~return type has no value type specified~'
- '~no value type specified in iterable type array~'
- 'Call to function is_string() with non-falsy-string will always evaluate to true.'

0 comments on commit a624a76

Please sign in to comment.