Skip to content

Commit 5df42a5

Browse files
authored
Merge pull request #293 from tuandp/feature/php84-deprecation-warning
Fix PHP 8.4 deprecation: Implicitly marking parameter as nullable is deprecated, the explicit nullable type must be used instead
2 parents a9f5dc0 + e4af9b2 commit 5df42a5

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/DynamoDb/QueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function setExpressionAttributeValue($placeholder, $value)
9797
* @param DynamoDbClient|null $client
9898
* @return ExecutableQuery
9999
*/
100-
public function prepare(DynamoDbClient $client = null)
100+
public function prepare(?DynamoDbClient $client = null)
101101
{
102102
$raw = new RawDynamoDbQuery(null, $this->query);
103103
return new ExecutableQuery($client ?: $this->service->getClient(), $raw->finalize()->query);

src/DynamoDbCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class DynamoDbCollection extends Collection
1212
*/
1313
private $conditionIndex = null;
1414

15-
public function __construct(array $items = [], Index $conditionIndex = null)
15+
public function __construct(array $items = [], ?Index $conditionIndex = null)
1616
{
1717
parent::__construct($items);
1818

src/DynamoDbQueryBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function offset($value)
147147
*
148148
* @return $this
149149
*/
150-
public function after(DynamoDbModel $after = null)
150+
public function after(?DynamoDbModel $after = null)
151151
{
152152
if (empty($after)) {
153153
$this->lastEvaluatedKey = null;
@@ -884,7 +884,7 @@ public function withoutGlobalScope($scope)
884884
* @param array|null $scopes
885885
* @return $this
886886
*/
887-
public function withoutGlobalScopes(array $scopes = null)
887+
public function withoutGlobalScopes(?array $scopes = null)
888888
{
889889
if (is_array($scopes)) {
890890
foreach ($scopes as $scope) {

src/H.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps
1414
class H
1515
{
16-
public static function array_first($array, callable $callback = null, $default = null)
16+
public static function array_first($array, ?callable $callback = null, $default = null)
1717
{
1818
if (is_null($callback)) {
1919
if (empty($array)) {

0 commit comments

Comments
 (0)