Skip to content

Commit 34e7ad7

Browse files
Clarifed dotenv docs
1 parent c988660 commit 34e7ad7

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/Dotenv.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* This is the dotenv class.
1111
*
1212
* It's responsible for loading a `.env` file in the given directory and
13-
* setting the environment vars.
13+
* setting the environment variables.
1414
*/
1515
class Dotenv
1616
{
@@ -53,7 +53,6 @@ public static function create($path, $file = null, FactoryInterface $envFactory
5353
return new self($loader);
5454
}
5555

56-
5756
/**
5857
* Returns the full path to the file.
5958
*
@@ -76,17 +75,19 @@ private static function getFilePath($path, $file)
7675
*
7776
* @throws \Dotenv\Exception\InvalidPathException|\Dotenv\Exception\InvalidFileException
7877
*
79-
* @return array
78+
* @return string[]
8079
*/
8180
public function load()
8281
{
8382
return $this->loadData();
8483
}
8584

8685
/**
87-
* Load environment file in given directory, suppress InvalidPathException.
86+
* Load environment file in given directory, silently failing if it doesn't exist.
87+
*
88+
* @throws \Dotenv\Exception\InvalidFileException
8889
*
89-
* @return array
90+
* @return string[]
9091
*/
9192
public function safeLoad()
9293
{
@@ -103,7 +104,7 @@ public function safeLoad()
103104
*
104105
* @throws \Dotenv\Exception\InvalidPathException|\Dotenv\Exception\InvalidFileException
105106
*
106-
* @return array
107+
* @return string[]
107108
*/
108109
public function overload()
109110
{
@@ -117,7 +118,7 @@ public function overload()
117118
*
118119
* @throws \Dotenv\Exception\InvalidPathException|\Dotenv\Exception\InvalidFileException
119120
*
120-
* @return array
121+
* @return string[]
121122
*/
122123
protected function loadData($overload = false)
123124
{

0 commit comments

Comments
 (0)