Skip to content

Commit

Permalink
Use conditional return types
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Jan 2, 2024
1 parent fb1f0fa commit fa17b85
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Config extends Repository
* @param string $key
* @param bool|null $default
*
* @return bool|null Returns null if the key is not found
* @return ($default is null ? bool|null : bool) Returns null if the key is not found
*/
public function getBool(string $key, ?bool $default = null): ?bool
{
Expand All @@ -44,7 +44,7 @@ public function getBool(string $key, ?bool $default = null): ?bool
* @param string $key
* @param string|null $default
*
* @return string|null Returns null if the key is not found
* @return ($default is null ? string|null : string) Returns null if the key is not found
*/
public function getString(string $key, ?string $default = null): ?string
{
Expand All @@ -63,7 +63,7 @@ public function getString(string $key, ?string $default = null): ?string
* @param string $key
* @param int|null $default
*
* @return int|null Returns null if the key is not found
* @return ($default is null ? int|null : int) Returns null if the key is not found
*/
public function getInt(string $key, ?int $default = null): ?int
{
Expand All @@ -82,7 +82,7 @@ public function getInt(string $key, ?int $default = null): ?int
* @param string $key
* @param mixed[]|null $default
*
* @return mixed[]|null Returns null if the key is not found
* @return ($default is null ? mixed[]|null : mixed[]) Returns null if the key is not found
*/
public function getArray(string $key, ?array $default = null): ?array
{
Expand Down

0 comments on commit fa17b85

Please sign in to comment.