run php-cs-fixer

This commit is contained in:
Robin Appelman 2018-08-24 17:51:32 +02:00
commit 2842dffb51
41 changed files with 151 additions and 141 deletions

View file

@ -141,7 +141,7 @@ class Parser {
$value = trim($value);
if (!isset($data[$name])) {
$data[$name] = $value;
$data[$name] = $value;
}
}
return [
@ -156,7 +156,7 @@ class Parser {
array_pop($output);
$regex = '/^\s*(.*?)\s\s\s\s+(?:([NDHARS]*)\s+)?([0-9]+)\s+(.*)$/';
//2 spaces, filename, optional type, size, date
$content = array();
$content = [];
foreach ($output as $line) {
if (preg_match($regex, $line, $matches)) {
list(, $name, $mode, $size, $time) = $matches;
@ -171,14 +171,14 @@ class Parser {
}
public function parseListShares($output) {
$shareNames = array();
$shareNames = [];
foreach ($output as $line) {
if (strpos($line, '|')) {
list($type, $name, $description) = explode('|', $line);
if (strtolower($type) === 'disk') {
$shareNames[$name] = $description;
}
} else if (strpos($line, 'Disk')) {
} elseif (strpos($line, 'Disk')) {
// new output format
list($name, $description) = explode('Disk', $line);
$shareNames[trim($name)] = trim($description);