Skip to content

Commit 741a989

Browse files
author
Alexandre Gérault
committed
feat(config): add missing methods in contract
1 parent f602515 commit 741a989

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/Illuminate/Contracts/Config/Repository.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,34 @@ public function prepend($key, $value);
5454
* @return void
5555
*/
5656
public function push($key, $value);
57+
58+
/**
59+
* Get the specified configuration value typed as a string.
60+
* If the value isn't a string it should throw an exception.
61+
*/
62+
public function string(string $key): string;
63+
64+
/**
65+
* Get the specified configuration value typed as an array.
66+
* If the value isn't an array it should throw an exception.
67+
*/
68+
public function array(string $key): array;
69+
70+
/**
71+
* Get the specified configuration value typed as an integer.
72+
* If the value isn't an integer it should throw an exception.
73+
*/
74+
public function integer(string $key): int;
75+
76+
/**
77+
* Get the specified configuration value typed as a boolean.
78+
* If the value isn't a boolean it should throw an exception.
79+
*/
80+
public function boolean(string $key): bool;
81+
82+
/**
83+
* Get the specified configuration value typed as a float.
84+
* If the value isn't a float it should throw an exception.
85+
*/
86+
public function float(string $key): float;
5787
}

0 commit comments

Comments
 (0)