Applied fixes from StyleCI

This commit is contained in:
onigoetz
2016-07-27 15:32:51 -04:00
committed by Stéphane Goetz
parent cfc8d30ba2
commit 2314516ce9
52 changed files with 477 additions and 424 deletions

View File

@ -111,11 +111,17 @@ class Content extends Entry
$lines = preg_split('/\n/', $sections[0]);
foreach ($lines as $line) {
$trimmed = trim($line);
if ($trimmed == '') continue; // skip empty lines
if ($trimmed[0] == '#') continue; // can be taken as comments
$re = "/^([-\\w]*)\\s*?:(.*)/";
if (!preg_match($re, $trimmed, $parts)) break; //Break as soon as we have a line that doesn't match
if ($trimmed == '') {
continue;
} // skip empty lines
if ($trimmed[0] == '#') {
continue;
} // can be taken as comments
$re = '/^([-\\w]*)\\s*?:(.*)/';
if (!preg_match($re, $trimmed, $parts)) {
break;
} //Break as soon as we have a line that doesn't match
$key = strtolower(trim($parts[1]));
$value = trim($parts[2]);