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
18 changes: 18 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ parameters:
count: 1
path: src/DatabaseDriver.php

-
message: '#^Call to function is_string\(\) with string will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: src/DatabaseDriver.php

-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
Expand Down Expand Up @@ -72,6 +78,12 @@ parameters:
count: 1
path: src/DatabaseDriver.php

-
message: '#^Result of \|\| is always false\.$#'
identifier: booleanOr.alwaysFalse
count: 1
path: src/DatabaseDriver.php

-
message: '#^Strict comparison using \=\=\= between ''resource''\|''resource \(closed\)'' and ''object'' will always evaluate to false\.$#'
identifier: identical.alwaysFalse
Expand All @@ -84,6 +96,12 @@ parameters:
count: 1
path: src/DatabaseDriver.php

-
message: '#^Strict comparison using \=\=\= between string and null will always evaluate to false\.$#'
identifier: identical.alwaysFalse
count: 1
path: src/DatabaseDriver.php

-
message: '#^Unreachable statement \- code above always terminates\.$#'
identifier: deadCode.unreachable
Expand Down
6 changes: 5 additions & 1 deletion src/DatabaseDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,12 @@ public function __destruct()
*
* @since 2.0.0
*/
public function alterDbCharacterSet(string $dbName)
public function alterDbCharacterSet($dbName)
{
if ($dbName === null || !is_string($dbName) || $dbName === '') {
throw new \RuntimeException('Database name must not be null and a non empty string.');
}

$this->setQuery($this->getAlterDbCharacterSet($dbName));

return $this->execute();
Expand Down