Skip to content

Commit a42a05c

Browse files
committed
Merge pull request #139 from joanhey/explicit-nullable
Fix explicit nullable
2 parents 41d74d8 + 14eee24 commit a42a05c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/database/src/AbstractConnection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ public function statement(): \PDOStatement
453453
* @param int $fetchStyle
454454
* @return array|object|false
455455
*/
456-
public function queryOne(int $fetchStyle = null)
456+
public function queryOne(?int $fetchStyle = null)
457457
{
458458
$fetchStyle = $fetchStyle ?: $this->options[\PDO::ATTR_DEFAULT_FETCH_MODE];
459459
return $this->statement->fetch($fetchStyle);
@@ -464,7 +464,7 @@ public function queryOne(int $fetchStyle = null)
464464
* @param int $fetchStyle
465465
* @return array
466466
*/
467-
public function queryAll(int $fetchStyle = null): array
467+
public function queryAll(?int $fetchStyle = null): array
468468
{
469469
$fetchStyle = $fetchStyle ?: $this->options[\PDO::ATTR_DEFAULT_FETCH_MODE];
470470
return $this->statement->fetchAll($fetchStyle);

src/database/src/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ class Connection extends AbstractConnection
1111

1212
protected $exceptional = false;
1313

14-
public function queryOne(int $fetchStyle = null)
14+
public function queryOne(?int $fetchStyle = null)
1515
{
1616
return $this->call(__FUNCTION__, func_get_args());
1717
}
1818

19-
public function queryAll(int $fetchStyle = null): array
19+
public function queryAll(?int $fetchStyle = null): array
2020
{
2121
return $this->call(__FUNCTION__, func_get_args());
2222
}

0 commit comments

Comments
 (0)