Skip to content

Commit 58ac8e7

Browse files
Minor Tweaks (#304)
See commit messages for detail.
1 parent e1ac00a commit 58ac8e7

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

src/Dotenv.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static function create($path, $file = null, FactoryInterface $envFactory
5050
true
5151
);
5252

53-
return new Dotenv($loader);
53+
return new self($loader);
5454
}
5555

5656

@@ -68,9 +68,7 @@ private static function getFilePath($path, $file)
6868
$file = '.env';
6969
}
7070

71-
$filePath = rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$file;
72-
73-
return $filePath;
71+
return rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$file;
7472
}
7573

7674
/**

src/Environment/AbstractVariables.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace Dotenv\Environment;
44

5-
use ArrayAccess;
6-
75
/**
86
* This is the abstract variables implementation.
97
*

src/Loader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ protected function sanitiseVariableValue($name, $value)
305305
%1$s # match a quote at the start of the value
306306
( # capturing sub-pattern used
307307
(?: # we do not need to capture this
308-
[^%1$s\\\\]* # any character other than a quote or backslash
308+
[^%1$s\\\\]+ # any character other than a quote or backslash
309309
|\\\\\\\\ # or two backslashes together
310310
|\\\\%1$s # or an escaped quote e.g \"
311311
)* # as many characters that match the previous rules

0 commit comments

Comments
 (0)