diff --git a/Editor.php b/Editor.php index a54085a..7bdefc3 100644 --- a/Editor.php +++ b/Editor.php @@ -1673,7 +1673,7 @@ private function _ssp_sort($query, $http) // Paging makes little sense without an ordering clause, so if there is // no order to apply (possible in DT2 on the third click of a header) // we apply the primary key as the ordering value. - if (! isset($http['order']) || count($http['order']) === 0) { + if (!isset($http['order']) || count($http['order']) === 0) { $query->order($this->_pkey[0] . ' asc'); } } diff --git a/Editor/Join.php b/Editor/Join.php index 8c0e0ac..5c0696c 100644 --- a/Editor/Join.php +++ b/Editor/Join.php @@ -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 */ diff --git a/Editor/Upload.php b/Editor/Upload.php index e77074d..81e93ff 100644 --- a/Editor/Upload.php +++ b/Editor/Upload.php @@ -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)); } } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 3e26622..51254da 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -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, 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 diff --git a/phpstan.neon.dist b/phpstan.neon.dist index cdaa241..f02b3bb 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -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.' \ No newline at end of file