8000 Add scalar typehints/return types to Dotenv · symfony/symfony@779c38c · GitHub
[go: up one dir, main page]

Skip to content

Commit 779c38c

Browse files
committed
Add scalar typehints/return types to Dotenv
1 parent 0a084dd commit 779c38c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Dotenv/Dotenv.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ final class Dotenv
4545
* @throws FormatException when a file has a syntax error
4646
* @throws PathException when a file does not exist or is not readable
4747
*/
48-
public function load($path, ...$paths)
48+
public function load($path, string ...$paths): void
4949
{
5050
array_unshift($paths, $path);
5151

@@ -65,7 +65,7 @@ public function load($path, ...$paths)
6565
*
6666
* @param array $values An array of env variables
6767
*/
68-
public function populate($values)
68+
public function populate(array $values): void
6969
{
7070
foreach ($values as $name => $value) {
7171
if (isset($_ENV[$name]) || isset($_SERVER[$name]) || false !== getenv($name)) {
@@ -88,7 +88,7 @@ public function populate($values)
8888
*
8989
* @throws FormatException when a file has a syntax error
9090
*/
91-
public function parse($data, $path = '.env')
91+
public function parse(string $data, string $path = '.env')
9292
{
9393
$this->path = $path;
9494
$this->data = str_replace(array("\r\n", "\r"), "\n", $data);

0 commit comments

Comments
 (0)
0