mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/17496] Fix Implicitly marking parameters as nullable PHP deprecations
Also use union types consistently instead of question marks. Fixed with php-cs-fixer. PHPBB-17496
This commit is contained in:
@@ -74,7 +74,7 @@ abstract class database_task extends task_base
|
||||
*
|
||||
* @return Result|null Result of the query.
|
||||
*/
|
||||
protected function query(string $sql) : ?Result
|
||||
protected function query(string $sql) : Result|null
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -95,7 +95,7 @@ abstract class database_task extends task_base
|
||||
*
|
||||
* @return Statement|null The prepared statement object or null if preparing failed
|
||||
*/
|
||||
protected function create_prepared_stmt(string $sql): ?Statement
|
||||
protected function create_prepared_stmt(string $sql): Statement|null
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -155,7 +155,7 @@ abstract class database_task extends task_base
|
||||
*
|
||||
* @return int|null The last insert ID.
|
||||
*/
|
||||
protected function get_last_insert_id() : ?int
|
||||
protected function get_last_insert_id() : int|null
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@@ -38,7 +38,7 @@ trait sequential_task
|
||||
*
|
||||
* @throws resource_limit_reached_exception When resources are exhausted.
|
||||
*/
|
||||
protected function execute(config $config, array $data, ?string $counter_name = null) : void
|
||||
protected function execute(config $config, array $data, string|null $counter_name = null) : void
|
||||
{
|
||||
if ($counter_name === null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user