Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/ArrayReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static function createFromArray(array $data = []): self
*
* @return int The value
*/
public function getInt(string $key, int $default = null): int
public function getInt(string $key, ?int $default = null): int
{
$value = $this->find($key, $default);

Expand All @@ -66,7 +66,7 @@ public function getInt(string $key, int $default = null): int
*
* @return int|null The value
*/
public function findInt(string $key, int $default = null): ?int
public function findInt(string $key, ?int $default = null): ?int
{
$value = $this->find($key, $default);

Expand All @@ -87,7 +87,7 @@ public function findInt(string $key, int $default = null): ?int
*
* @return string The value
*/
public function getString(string $key, string $default = null): string
public function getString(string $key, ?string $default = null): string
{
$value = $this->find($key, $default);

Expand All @@ -106,7 +106,7 @@ public function getString(string $key, string $default = null): string
*
* @return string|null The value
*/
public function findString(string $key, string $default = null): ?string
public function findString(string $key, ?string $default = null): ?string
{
$value = $this->find($key, $default);

Expand All @@ -127,7 +127,7 @@ public function findString(string $key, string $default = null): ?string
*
* @return array<mixed> The value
*/
public function getArray(string $key, array $default = null): array
public function getArray(string $key, ?array $default = null): array
{
$value = $this->find($key, $default);

Expand All @@ -146,7 +146,7 @@ public function getArray(string $key, array $default = null): array
*
* @return array<mixed>|null The value
*/
public function findArray(string $key, array $default = null): ?array
public function findArray(string $key, ?array $default = null): ?array
{
$value = $this->find($key, $default);

Expand All @@ -167,7 +167,7 @@ public function findArray(string $key, array $default = null): ?array
*
* @return float The value
*/
public function getFloat(string $key, float $default = null): float
public function getFloat(string $key, ?float $default = null): float
{
$value = $this->find($key, $default);

Expand All @@ -186,7 +186,7 @@ public function getFloat(string $key, float $default = null): float
*
* @return float|null The value
*/
public function findFloat(string $key, float $default = null): ?float
public function findFloat(string $key, ?float $default = null): ?float
{
$value = $this->find($key, $default);

Expand All @@ -207,7 +207,7 @@ public function findFloat(string $key, float $default = null): ?float
*
* @return bool The value
*/
public function getBool(string $key, bool $default = null): bool
public function getBool(string $key, ?bool $default = null): bool
{
$value = $this->find($key, $default);

Expand All @@ -226,7 +226,7 @@ public function getBool(string $key, bool $default = null): bool
*
* @return bool|null The value
*/
public function findBool(string $key, bool $default = null): ?bool
public function findBool(string $key, ?bool $default = null): ?bool
{
$value = $this->find($key, $default);

Expand All @@ -247,7 +247,7 @@ public function findBool(string $key, bool $default = null): ?bool
*
* @return Chronos The value
*/
public function getChronos(string $key, Chronos $default = null): Chronos
public function getChronos(string $key, ?Chronos $default = null): Chronos
{
$value = $this->find($key, $default);

Expand All @@ -270,7 +270,7 @@ public function getChronos(string $key, Chronos $default = null): Chronos
*
* @return Chronos|null The value
*/
public function findChronos(string $key, Chronos $default = null): ?Chronos
public function findChronos(string $key, ?Chronos $default = null): ?Chronos
{
$value = $this->find($key, $default);

Expand Down