Skip to content

Commit 93e7e73

Browse files
committed
Init
1 parent 8ad3976 commit 93e7e73

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/ArrayReader.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public function __construct(array $data = [])
3232
* @param string $key The key
3333
* @param int|null $default The default value
3434
*
35+
* @throws InvalidArgumentException
36+
*
3537
* @return int The value
3638
*/
3739
public function getInt(string $key, int $default = null): int
@@ -49,7 +51,7 @@ public function getInt(string $key, int $default = null): int
4951
* Get value as integer or null.
5052
*
5153
* @param string $key The key
52-
* @param int $default The default value
54+
* @param int|null $default The default value
5355
*
5456
* @return int|null The value
5557
*/
@@ -70,6 +72,8 @@ public function findInt(string $key, int $default = null)
7072
* @param string $key The key
7173
* @param string|null $default The default value
7274
*
75+
* @throws InvalidArgumentException
76+
*
7377
* @return string The value
7478
*/
7579
public function getString(string $key, string $default = null): string
@@ -108,6 +112,8 @@ public function findString(string $key, string $default = null)
108112
* @param string $key The key
109113
* @param array|null $default The default value
110114
*
115+
* @throws InvalidArgumentException
116+
*
111117
* @return array The value
112118
*/
113119
public function getArray(string $key, array $default = null): array
@@ -146,6 +152,8 @@ public function findArray(string $key, array $default = null)
146152
* @param string $key The key
147153
* @param float|null $default The default value
148154
*
155+
* @throws InvalidArgumentException
156+
*
149157
* @return float The value
150158
*/
151159
public function getFloat(string $key, float $default = null): float
@@ -184,6 +192,8 @@ public function findFloat(string $key, float $default = null)
184192
* @param string $key The key
185193
* @param bool|null $default The default value
186194
*
195+
* @throws InvalidArgumentException
196+
*
187197
* @return bool The value
188198
*/
189199
public function getBool(string $key, bool $default = null): bool
@@ -222,6 +232,8 @@ public function findBool(string $key, bool $default = null)
222232
* @param string $key The key
223233
* @param Chronos|null $default The default value
224234
*
235+
* @throws InvalidArgumentException
236+
*
225237
* @return Chronos The value
226238
*/
227239
public function getChronos(string $key, Chronos $default = null): Chronos

0 commit comments

Comments
 (0)