Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
runs-on: ubuntu-latest
container: joomlaprojects/docker-images:php8.4
needs: [code-style-php]
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
Expand Down
180 changes: 9 additions & 171 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,6 @@ parameters:
count: 1
path: src/DatabaseQuery.php

-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
count: 9
path: src/DatabaseQuery.php

-
message: '#^Instanceof between Joomla\\Database\\DatabaseInterface and Joomla\\Database\\DatabaseInterface will always evaluate to true\.$#'
identifier: instanceof.alwaysTrue
Expand All @@ -144,30 +138,12 @@ parameters:
count: 1
path: src/DatabaseQuery.php

-
message: '#^Left side of \|\| is always true\.$#'
identifier: booleanOr.leftAlwaysTrue
count: 1
path: src/DatabaseQuery.php

-
message: '#^Parameter \#2 \$array of function implode expects array\|null, string given\.$#'
identifier: argument.type
count: 1
path: src/DatabaseQuery.php

-
message: '#^Parameter \#2 \$elements of class Joomla\\Database\\Query\\QueryElement constructor expects array\<string\>\|string, null given\.$#'
identifier: argument.type
count: 1
path: src/DatabaseQuery.php

-
message: '#^Property Joomla\\Database\\DatabaseQuery\:\:\$querySet has unknown class Joomla\\Database\\Query\\DatabaseQuery as its type\.$#'
identifier: class.notFound
count: 1
path: src/DatabaseQuery.php

-
message: '#^Return type \(string\) of method Joomla\\Database\\DatabaseQuery\:\:length\(\) should be compatible with return type \(int\) of method Joomla\\Database\\QueryInterface\:\:length\(\)$#'
identifier: method.childReturnType
Expand Down Expand Up @@ -216,18 +192,6 @@ parameters:
count: 1
path: src/Mysql/MysqlDriver.php

-
message: '#^Method Joomla\\Database\\Mysql\\MysqlImporter\:\:getKeyLookup\(\) has Exception in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Mysql/MysqlImporter.php

-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
count: 1
path: src/Mysql/MysqlQuery.php

-
message: '#^Call to function is_callable\(\) with array\{mysqli, ''close''\} will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
Expand Down Expand Up @@ -264,12 +228,6 @@ parameters:
count: 1
path: src/Mysqli/MysqliDriver.php

-
message: '#^Method Joomla\\Database\\Mysqli\\MysqliDriver\:\:connect\(\) has RuntimeException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Mysqli/MysqliDriver.php

-
message: '#^Method Joomla\\Database\\Mysqli\\MysqliDriver\:\:serverClaimsUtf8mb4Support\(\) is unused\.$#'
identifier: method.unused
Expand Down Expand Up @@ -300,12 +258,6 @@ parameters:
count: 2
path: src/Mysqli/MysqliDriver.php

-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
count: 1
path: src/Mysqli/MysqliQuery.php

-
message: '#^PHPDoc type array of property Joomla\\Database\\Mysqli\\MysqliQuery\:\:\$nullDatetimeList is not covariant with PHPDoc type array\<string\> of overridden property Joomla\\Database\\DatabaseQuery\:\:\$nullDatetimeList\.$#'
identifier: property.phpDocType
Expand Down Expand Up @@ -360,12 +312,6 @@ parameters:
count: 4
path: src/Pdo/PdoDriver.php

-
message: '#^Method Joomla\\Database\\Pdo\\PdoDriver\:\:connect\(\) has RuntimeException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Pdo/PdoDriver.php

-
message: '#^PHPDoc type PDO of property Joomla\\Database\\Pdo\\PdoDriver\:\:\$connection is not covariant with PHPDoc type resource of overridden property Joomla\\Database\\DatabaseDriver\:\:\$connection\.$#'
identifier: property.phpDocType
Expand Down Expand Up @@ -402,12 +348,6 @@ parameters:
count: 1
path: src/Pgsql/PgsqlDriver.php

-
message: '#^Method Joomla\\Database\\Pgsql\\PgsqlDriver\:\:getTableCreate\(\) has RuntimeException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Pgsql/PgsqlDriver.php

-
message: '#^Strict comparison using \=\=\= between string and 0 will always evaluate to false\.$#'
identifier: identical.alwaysFalse
Expand Down Expand Up @@ -498,12 +438,6 @@ parameters:
count: 1
path: src/Pgsql/PgsqlImporter.php

-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
count: 12
path: src/Pgsql/PgsqlQuery.php

-
message: '#^Instanceof between string and \$this\(Joomla\\Database\\Pgsql\\PgsqlQuery\) will always evaluate to false\.$#'
identifier: instanceof.alwaysFalse
Expand All @@ -523,8 +457,14 @@ parameters:
path: src/Pgsql/PgsqlQuery.php

-
message: '#^Ternary operator condition is always true\.$#'
identifier: ternary.alwaysTrue
message: '#^Property Joomla\\Database\\DatabaseQuery\:\:\$limit \(int\|null\) does not accept Joomla\\Database\\Query\\QueryElement\.$#'
identifier: assign.propertyType
count: 1
path: src/Pgsql/PgsqlQuery.php

-
message: '#^Property Joomla\\Database\\DatabaseQuery\:\:\$offset \(int\|null\) does not accept Joomla\\Database\\Query\\QueryElement\.$#'
identifier: assign.propertyType
count: 1
path: src/Pgsql/PgsqlQuery.php

Expand Down Expand Up @@ -552,72 +492,12 @@ parameters:
count: 1
path: src/Sqlite/SqliteDriver.php

-
message: '#^Method Joomla\\Database\\Sqlite\\SqliteDriver\:\:alterDbCharacterSet\(\) has RuntimeException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Sqlite/SqliteDriver.php

-
message: '#^Method Joomla\\Database\\Sqlite\\SqliteDriver\:\:connect\(\) has RuntimeException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Sqlite/SqliteDriver.php

-
message: '#^Method Joomla\\Database\\Sqlite\\SqliteDriver\:\:createDatabase\(\) has RuntimeException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Sqlite/SqliteDriver.php

-
message: '#^Method Joomla\\Database\\Sqlite\\SqliteDriver\:\:getConnectionCollation\(\) has RuntimeException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Sqlite/SqliteDriver.php

-
message: '#^Method Joomla\\Database\\Sqlite\\SqliteDriver\:\:getConnectionEncryption\(\) has RuntimeException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Sqlite/SqliteDriver.php

-
message: '#^Method Joomla\\Database\\Sqlite\\SqliteDriver\:\:lockTable\(\) has RuntimeException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Sqlite/SqliteDriver.php

-
message: '#^Method Joomla\\Database\\Sqlite\\SqliteDriver\:\:unlockTables\(\) has RuntimeException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Sqlite/SqliteDriver.php

-
message: '#^Unreachable statement \- code above always terminates\.$#'
identifier: deadCode.unreachable
count: 1
path: src/Sqlite/SqliteDriver.php

-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
count: 1
path: src/Sqlite/SqliteQuery.php

-
message: '#^Left side of \|\| is always true\.$#'
identifier: booleanOr.leftAlwaysTrue
count: 1
path: src/Sqlite/SqliteQuery.php

-
message: '#^Result of \|\| is always true\.$#'
identifier: booleanOr.alwaysTrue
count: 1
path: src/Sqlite/SqliteQuery.php

-
message: '#^Unsafe usage of new static\(\)\.$#'
identifier: new.static
Expand All @@ -642,28 +522,10 @@ parameters:
count: 4
path: src/Sqlsrv/SqlsrvDriver.php

-
message: '#^Method Joomla\\Database\\Sqlsrv\\SqlsrvDriver\:\:connect\(\) has RuntimeException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Sqlsrv/SqlsrvDriver.php

-
message: '#^Method Joomla\\Database\\Sqlsrv\\SqlsrvDriver\:\:lockTable\(\) has RuntimeException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Sqlsrv/SqlsrvDriver.php

-
message: '#^Method Joomla\\Database\\Sqlsrv\\SqlsrvDriver\:\:unlockTables\(\) has RuntimeException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/Sqlsrv/SqlsrvDriver.php

-
message: '#^Parameter \#2 \$array of function implode expects array\<string\>, list\<array\|string\> given\.$#'
identifier: argument.type
count: 1
count: 2
path: src/Sqlsrv/SqlsrvDriver.php

-
Expand All @@ -690,24 +552,12 @@ parameters:
count: 1
path: src/Sqlsrv/SqlsrvQuery.php

-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
count: 14
path: src/Sqlsrv/SqlsrvQuery.php

-
message: '#^Instanceof between Joomla\\Database\\DatabaseInterface and Joomla\\Database\\DatabaseInterface will always evaluate to true\.$#'
identifier: instanceof.alwaysTrue
count: 1
path: src/Sqlsrv/SqlsrvQuery.php

-
message: '#^Left side of \|\| is always true\.$#'
identifier: booleanOr.leftAlwaysTrue
count: 1
path: src/Sqlsrv/SqlsrvQuery.php

-
message: '#^Offset int\<1, max\> on list in isset\(\) does not exist\.$#'
identifier: isset.offset
Expand All @@ -720,18 +570,6 @@ parameters:
count: 1
path: src/Sqlsrv/SqlsrvQuery.php

-
message: '#^Parameter \#2 \$array of function implode expects array\<string\>, array\<array\|string\> given\.$#'
identifier: argument.type
count: 1
path: src/Sqlsrv/SqlsrvQuery.php

-
message: '#^Result of \|\| is always true\.$#'
identifier: booleanOr.alwaysTrue
count: 1
path: src/Sqlsrv/SqlsrvQuery.php

-
message: '#^Return type \(string\) of method Joomla\\Database\\Sqlsrv\\SqlsrvQuery\:\:length\(\) should be compatible with return type \(int\) of method Joomla\\Database\\QueryInterface\:\:length\(\)$#'
identifier: method.childReturnType
Expand Down
2 changes: 1 addition & 1 deletion src/DatabaseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ public function lockTable($tableName);
* @param array|string $text A string or an array of strings to quote.
* @param boolean $escape True (default) to escape the string, false to leave it unchanged.
*
* @return string
* @return array|string The quoted input string.
*
* @since 2.0.0
*/
Expand Down
Loading