@@ -70,12 +70,12 @@ public function get(string $name = '', $default = null)
7070
7171 $ lastIndex = count ($ nameExploded ) - 1 ;
7272 foreach ($ nameExploded as $ key => $ variableName ) {
73- if (!$ variableName ) {
73+ if (! $ variableName ) {
7474 return null ;
7575 }
7676
7777 if (isset ($ lookup [$ variableName ])) {
78- if (!is_array ($ value ) && $ key < $ lastIndex ) {
78+ if (! is_array ($ value ) && $ key < $ lastIndex ) {
7979 return null ;
8080 }
8181
@@ -139,11 +139,11 @@ public function persist(string $name, $value, bool $overwrite = true, bool $quot
139139 $ content = preg_replace ($ pattern , $ line , $ content );
140140 } elseif (
141141 ($ envVariableExistsInMemory && $ overwrite ) ||
142- !$ envVariableExistsInMemory ||
143- !$ envVariableExistsInFile
142+ ! $ envVariableExistsInMemory ||
143+ ! $ envVariableExistsInFile
144144 ) {
145145 $ content = trim ($ content )."\n\n" .$ line ;
146- } elseif (($ envVariableExistsInMemory || $ envVariableExistsInFile ) && !$ overwrite ) {
146+ } elseif (($ envVariableExistsInMemory || $ envVariableExistsInFile ) && ! $ overwrite ) {
147147 return $ this ;
148148 }
149149
@@ -165,7 +165,7 @@ public static function load($path)
165165 */
166166 protected function replaceReferences ()
167167 {
168- if (!\file_exists ($ this ->path )) {
168+ if (! \file_exists ($ this ->path )) {
169169 return $ this ;
170170 }
171171
@@ -176,7 +176,7 @@ protected function replaceReferences()
176176 if (preg_match ($ pattern , $ line , $ matches )) {
177177 $ ref = $ matches [3 ];
178178
179- if (!$ this ->envVariableExistsInMemory ($ ref )) {
179+ if (! $ this ->envVariableExistsInMemory ($ ref )) {
180180 continue ;
181181 }
182182
@@ -237,8 +237,8 @@ protected function valueSameAsReference($refValue, $lineValue): bool
237237 protected function isStringifiable ($ var ): bool
238238 {
239239 return
240- !is_array ($ var ) &&
241- ((!is_object ($ var ) && settype ($ var , 'string ' ) !== false ) ||
240+ ! is_array ($ var ) &&
241+ ((! is_object ($ var ) && settype ($ var , 'string ' ) !== false ) ||
242242 (is_object ($ var ) && method_exists ($ var , '__toString ' )));
243243 }
244244
@@ -303,7 +303,7 @@ protected function getLineWithString(string $fileName, string $str)
303303 */
304304 protected function addIfNotExists (string $ name , $ value , string $ section = '' )
305305 {
306- if (!isset ($ this ->env [$ name ])) {
306+ if (! isset ($ this ->env [$ name ])) {
307307 $ this ->add ($ name , $ value , $ section );
308308 }
309309
0 commit comments