Skip to content

Commit

Permalink
Merge pull request #13 from Rorkh/php8.4-deprecation-fix
Browse files Browse the repository at this point in the history
PHP 8.4 Deprecation fix
  • Loading branch information
odan authored Nov 24, 2024
2 parents 0b010eb + f62b59a commit f74f15e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(array $data = [])
*
* @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 @@ -54,7 +54,7 @@ public function getInt(string $key, int $default = null): int
*
* @return int|null The value
*/
public function findInt(string $key, int $default = null)
public function findInt(string $key, ?int $default = null)
{
$value = $this->find($key, $default);

Expand All @@ -75,7 +75,7 @@ public function findInt(string $key, int $default = null)
*
* @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 @@ -94,7 +94,7 @@ public function getString(string $key, string $default = null): string
*
* @return string|null The value
*/
public function findString(string $key, string $default = null)
public function findString(string $key, ?string $default = null)
{
$value = $this->find($key, $default);

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

Expand All @@ -155,7 +155,7 @@ public function findArray(string $key, array $default = null)
*
* @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 @@ -174,7 +174,7 @@ public function getFloat(string $key, float $default = null): float
*
* @return float|null The value
*/
public function findFloat(string $key, float $default = null)
public function findFloat(string $key, ?float $default = null)
{
$value = $this->find($key, $default);

Expand All @@ -195,7 +195,7 @@ public function findFloat(string $key, float $default = null)
*
* @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 @@ -214,7 +214,7 @@ public function getBool(string $key, bool $default = null): bool
*
* @return bool|null The value
*/
public function findBool(string $key, bool $default = null)
public function findBool(string $key, ?bool $default = null)
{
$value = $this->find($key, $default);

Expand All @@ -235,7 +235,7 @@ public function findBool(string $key, bool $default = null)
*
* @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 @@ -254,11 +254,11 @@ public function getChronos(string $key, Chronos $default = null): Chronos
* Get value as Chronos or null.
*
* @param string $key The key
* @param Chronos $default The default value
* @param Chronos|null $default The default value
*
* @return Chronos|null The value
*/
public function findChronos(string $key, Chronos $default = null)
public function findChronos(string $key, ?Chronos $default = null)
{
$value = $this->find($key, $default);

Expand Down

0 comments on commit f74f15e

Please sign in to comment.