Merge pull request #1181 from samsonasik/string-param-dotenv

use string type hint in $file parameter in DotEnv::__construct()
This commit is contained in:
Lonnie Ezell 2018-08-26 21:00:44 -05:00 committed by GitHub
commit e9a1d8ae4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,13 +57,8 @@ class DotEnv
* @param string $path
* @param string $file
*/
public function __construct(string $path, $file = '.env')
public function __construct(string $path, string $file = '.env')
{
if ( ! is_string($file))
{
$file = '.env';
}
$this->path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $file;
}