Browse Source

Merge pull request #15885 from cakephp/nullable-hints

Use nullable type hints instead of |null
Mark Scherer 4 years ago
parent
commit
5839df62f5
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/Datasource/QueryInterface.php
  2. 1 1
      src/Http/Cookie/CookieInterface.php

+ 2 - 2
src/Datasource/QueryInterface.php

@@ -177,7 +177,7 @@ interface QueryInterface
      * @param int|null $limit number of records to be returned
      * @return $this
      */
-    public function limit(int|null $limit);
+    public function limit(?int $limit);
 
     /**
      * Sets the number of records that should be skipped from the original result set
@@ -197,7 +197,7 @@ interface QueryInterface
      * @param int|null $offset number of records to be skipped
      * @return $this
      */
-    public function offset(int|null $offset);
+    public function offset(?int $offset);
 
     /**
      * Adds a single or multiple fields to be used in the ORDER clause for this query.

+ 1 - 1
src/Http/Cookie/CookieInterface.php

@@ -192,7 +192,7 @@ interface CookieInterface
      * @param \DateTimeInterface $time The time to test against. Defaults to 'now' in UTC.
      * @return bool
      */
-    public function isExpired(DateTimeInterface|null $time = null): bool;
+    public function isExpired(?DateTimeInterface $time = null): bool;
 
     /**
      * Check if the cookie is HTTP only