Skip to content

Commit 9ca5644

Browse files
Various fixes
1 parent c3f0244 commit 9ca5644

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/Dotenv.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,23 @@ public function __construct($path, $file = '.env')
3939
}
4040

4141
/**
42-
* Load `.env` file in given directory.
42+
* Load environment file in given directory.
4343
*
4444
* @return array
4545
*/
4646
public function load()
4747
{
48-
return $this->getLoaderData();
48+
return $this->loadData();
4949
}
5050

5151
/**
52-
* Load `.env` file in given directory.
52+
* Load environment file in given directory.
5353
*
5454
* @return array
5555
*/
5656
public function overload()
5757
{
58-
return $this->getLoaderData(true);
58+
return $this->loadData(true);
5959
}
6060

6161
/**
@@ -76,19 +76,23 @@ protected function getFilePath($path, $file)
7676

7777
return $filePath;
7878
}
79-
79+
8080
/**
81-
* Load data from '.env'
81+
* Actually load the data.
82+
*
83+
* @param bool $overload
84+
*
8285
* @return array
8386
*/
84-
private function getLoaderData($overload = false)
87+
protected function loadData($overload = false)
8588
{
8689
$this->loader = new Loader($this->filePath, !$overload);
90+
8791
return $this->loader->load();
8892
}
8993

9094
/**
91-
* Required ensures that the specified variables exist, and returns a new Validator object.
95+
* Required ensures that the specified variables exist, and returns a new validator object.
9296
*
9397
* @param string|string[] $variable
9498
*

0 commit comments

Comments
 (0)