Skip to content

Commit e9a7fac

Browse files
Apply fixes from StyleCI (#422)
1 parent eea090d commit e9a7fac

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

src/Environment/AbstractVariables.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function get($name)
6464
*
6565
* @return string|null
6666
*/
67-
protected abstract function getInternal($name);
67+
abstract protected function getInternal($name);
6868

6969
/**
7070
* Set an environment variable.
@@ -100,7 +100,7 @@ public function set($name, $value = null)
100100
*
101101
* @return void
102102
*/
103-
protected abstract function setInternal($name, $value = null);
103+
abstract protected function setInternal($name, $value = null);
104104

105105
/**
106106
* Clear an environment variable.
@@ -132,7 +132,7 @@ public function clear($name)
132132
*
133133
* @return void
134134
*/
135-
protected abstract function clearInternal($name);
135+
abstract protected function clearInternal($name);
136136

137137
/**
138138
* Determine if the environment is immutable.

src/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private static function parseValue($value)
135135
if ($char === $value[0] || $char === '\\') {
136136
return [$data[0].$char, self::QUOTED_STATE];
137137
} elseif (in_array($char, ['f', 'n', 'r', 't', 'v'], true)) {
138-
return [$data[0].stripcslashes('\\' . $char), self::QUOTED_STATE];
138+
return [$data[0].stripcslashes('\\'.$char), self::QUOTED_STATE];
139139
} else {
140140
throw new InvalidFileException(
141141
self::getErrorMessage('an unexpected escape sequence', $value)

src/Validator.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ function ($value) {
5050
'is missing'
5151
);
5252
}
53-
5453
}
5554

5655
/**
@@ -155,15 +154,14 @@ function ($value) use ($choices) {
155154
public function allowedRegexValues($regex)
156155
{
157156
return $this->assertCallback(
158-
function ($value) use ($regex)
159-
{
157+
function ($value) use ($regex) {
160158
if ($value === null) {
161159
return true;
162160
}
163161

164162
return Regex::match($regex, $value)->success()->getOrElse(0) === 1;
165163
},
166-
sprintf('does not match "%s"' , $regex)
164+
sprintf('does not match "%s"', $regex)
167165
);
168166
}
169167

tests/Dotenv/LinesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testProcessQuotes()
3030

3131
$expected = [
3232
"TEST=\"test\n test\\\"test\\\"\n test\"",
33-
"TEST_ND=\"test\\ntest\"",
33+
'TEST_ND="test\\ntest"',
3434
'TEST_NS=\'test\\ntest\'',
3535
'TEST_EQD="https://vision.googleapis.com/v1/images:annotate?key="',
3636
'TEST_EQS=\'https://vision.googleapis.com/v1/images:annotate?key=\'',

0 commit comments

Comments
 (0)