Skip to content

Commit

Permalink
Update deprecated implicitly nullable types
Browse files Browse the repository at this point in the history
These implicit nullable types cause warnings.

See: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types
  • Loading branch information
tom-on-the-internet committed Jan 10, 2025
1 parent 7f1efa7 commit 0e8699b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class Database
* @param bool $webpki Use Webpki (default: false)
*/
public function __construct(
string $path = null,
string $url = null,
?string $path = null,
?string $url = null,
#[\SensitiveParameter]
string $authToken = null,
?string $authToken = null,
#[\SensitiveParameter]
?string $encryptionKey = null,
int $syncInterval = 0,
Expand Down
4 changes: 2 additions & 2 deletions src/PDO.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class PDO extends \PDO
private Database $db;

public function __construct(
string $dsn = null,
?string $dsn = null,
?string $username = null,
#[\SensitiveParameter] ?string $password = null,
#[\SensitiveParameter] ?array $options = [],
Expand Down Expand Up @@ -102,7 +102,7 @@ public function quote($input, int $type = PDO::PARAM_STR): string
return 'NULL';
}

return "'".\SQLite3::escapeString($input)."'";
return "'" . \SQLite3::escapeString($input) . "'";
}

public function getAttribute(int $attribute): mixed
Expand Down

0 comments on commit 0e8699b

Please sign in to comment.