[cs] use short arrays, order imports

This commit is contained in:
TomasVotruba
2017-11-12 21:23:54 +01:00
committed by Jaap van Otterdijk
parent 87c6ecc5f4
commit 771a21db91
9 changed files with 13 additions and 14 deletions
+3 -3
View File
@@ -124,7 +124,7 @@ final class DocBlockFactory implements DocBlockFactoryInterface
$comment = trim(substr($comment, 0, -2));
}
return str_replace(array("\r\n", "\r"), "\n", $comment);
return str_replace(["\r\n", "\r"], "\n", $comment);
}
/**
@@ -143,7 +143,7 @@ final class DocBlockFactory implements DocBlockFactoryInterface
// method does not split tags so we return this verbatim as the fourth result (tags). This saves us the
// performance impact of running a regular expression
if (strpos($comment, '@') === 0) {
return array('', '', '', $comment);
return ['', '', '', $comment];
}
// clears all extra horizontal whitespace from the line endings to prevent parsing issues
@@ -241,7 +241,7 @@ final class DocBlockFactory implements DocBlockFactoryInterface
*/
private function splitTagBlockIntoTagLines($tags)
{
$result = array();
$result = [];
foreach (explode("\n", $tags) as $tag_line) {
if (isset($tag_line[0]) && ($tag_line[0] === '@')) {
$result[] = $tag_line;