composer update
This commit is contained in:
+7
-15
@@ -22,7 +22,7 @@ class Lines
|
||||
foreach ($lines as $line) {
|
||||
list($multiline, $line, $multilineBuffer) = self::multilineProcess($multiline, $line, $multilineBuffer);
|
||||
|
||||
if (!$multiline && !self::isComment($line) && self::isSetter($line)) {
|
||||
if (!$multiline && !self::isCommentOrWhitespace($line)) {
|
||||
$output[] = $line;
|
||||
}
|
||||
}
|
||||
@@ -115,28 +115,20 @@ class Lines
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the line in the file is a comment, e.g. begins with a #.
|
||||
* Determine if the line in the file is a comment or whitespace.
|
||||
*
|
||||
* @param string $line
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private static function isComment($line)
|
||||
private static function isCommentOrWhitespace($line)
|
||||
{
|
||||
if (trim($line) === '') {
|
||||
return true;
|
||||
}
|
||||
|
||||
$line = ltrim($line);
|
||||
|
||||
return isset($line[0]) && $line[0] === '#';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the given line looks like it's setting a variable.
|
||||
*
|
||||
* @param string $line
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private static function isSetter($line)
|
||||
{
|
||||
return strpos($line, '=') !== false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user