Skip to content

Commit 03f3bc2

Browse files
committed
Type-hint constants
1 parent 31d3765 commit 03f3bc2

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/Firebase/Contract/Database.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
*/
2020
interface Database
2121
{
22-
public const SERVER_TIMESTAMP = ['.sv' => 'timestamp'];
22+
/**
23+
* @var array{'.sv': 'timestamp'}
24+
*/
25+
public const array SERVER_TIMESTAMP = ['.sv' => 'timestamp'];
2326

2427
/**
2528
* Returns a Reference to the root or the specified path.

src/Firebase/Valinor/Normalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
final class Normalizer
1717
{
18-
private const DEFAULT_JSON_OPTIONS = JSON_UNESCAPED_SLASHES
18+
private const int DEFAULT_JSON_OPTIONS = JSON_UNESCAPED_SLASHES
1919
| JSON_UNESCAPED_UNICODE
2020
| JSON_UNESCAPED_SLASHES
2121
| JSON_UNESCAPED_UNICODE
@@ -64,7 +64,7 @@ public function toArray(mixed $value): array
6464
}
6565

6666
/**
67-
* @param int $options JSON encoding options
67+
* @param int|null $options JSON encoding options
6868
*
6969
* @return non-empty-string
7070
*/

0 commit comments

Comments
 (0)