@@ -50,8 +50,7 @@ discard block |
||
| 50 | 50 | break; |
| 51 | 51 | |
| 52 | 52 | // IndentationIssue |
| 53 | - case (preg_match(self::INDENTATION_PATTERN, $issue->getMessage(), $matches) ? $message : !$message): |
|
| 54 | - return $this->buildIndentationIssue($issue, $matches); |
|
| 53 | + case (preg_match(self::INDENTATION_PATTERN, $issue->getMessage(), $matches) ? $message : !$message) : return $this->buildIndentationIssue($issue, $matches); |
|
| 55 | 54 | break; |
| 56 | 55 | |
| 57 | 56 | // EmptySectionIssue |
@@ -60,12 +59,9 @@ discard block |
||
| 60 | 59 | break; |
| 61 | 60 | |
| 62 | 61 | // NestingConsistencyIssue |
| 63 | - case (preg_match(self::NESTED_CONSISTENCY_01, $issue->getMessage(), $matches) ? $message : !$message): |
|
| 64 | - case (preg_match(self::NESTED_CONSISTENCY_02, $issue->getMessage(), $matches) ? $message : !$message): |
|
| 65 | - return $this->buildNestingConsistencyIssue0102($issue, $matches, $tokens); |
|
| 62 | + case (preg_match(self::NESTED_CONSISTENCY_01, $issue->getMessage(), $matches) ? $message : !$message) : case (preg_match(self::NESTED_CONSISTENCY_02, $issue->getMessage(), $matches) ? $message : !$message) : return $this->buildNestingConsistencyIssue0102($issue, $matches, $tokens); |
|
| 66 | 63 | break; |
| 67 | - case (preg_match(self::NESTED_CONSISTENCY_03, $issue->getMessage(), $matches) ? $message : !$message): |
|
| 68 | - return $this->buildNestingConsistencyIssue03($issue, $matches, $tokens); |
|
| 64 | + case (preg_match(self::NESTED_CONSISTENCY_03, $issue->getMessage(), $matches) ? $message : !$message) : return $this->buildNestingConsistencyIssue03($issue, $matches, $tokens); |
|
| 69 | 65 | break; |
| 70 | 66 | |
| 71 | 67 | // Default is null |
@@ -87,7 +83,7 @@ discard block |
||
| 87 | 83 | $startLine = (int) $issue->getLine(); |
| 88 | 84 | $lines = $tokenLines->getLines(); |
| 89 | 85 | $amountOfLines = count($lines); |
| 90 | - for ($i = $startLine; $i<=$amountOfLines; $i++) { |
|
| 86 | + for ($i = $startLine; $i <= $amountOfLines; $i++) { |
|
| 91 | 87 | foreach ($lines[$i] as $token) { |
| 92 | 88 | if ($token->getType() === TokenInterface::TYPE_BRACE_CLOSE) { |
| 93 | 89 | $endLine = $i; |
@@ -111,7 +107,7 @@ discard block |
||
| 111 | 107 | if ($matches[2] === 'tab' || $matches[2] === 'tabs') { |
| 112 | 108 | $char = "\t"; |
| 113 | 109 | } |
| 114 | - return new IndentationIssue((int) $issue->getLine(), (int)($matches[1] ?? 0), $char); |
|
| 110 | + return new IndentationIssue((int) $issue->getLine(), (int) ($matches[1] ?? 0), $char); |
|
| 115 | 111 | } |
| 116 | 112 | |
| 117 | 113 | /** |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | $file = $file->merge($sniffReport); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - $issueCollection = new IssueCollection(); |
|
| 68 | + $issueCollection = new IssueCollection(); |
|
| 69 | 69 | $issueFactory = new IssueFactory(); |
| 70 | 70 | |
| 71 | 71 | foreach ($file->getIssues() as $issue) { |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | { |
| 118 | 118 | $configurationProcessor = new Processor(); |
| 119 | 119 | $this->linterConfiguration = new LinterConfiguration(); |
| 120 | - $linterConfig = $configurationProcessor->processConfiguration($this->linterConfiguration, [$this->config]); |
|
| 120 | + $linterConfig = $configurationProcessor->processConfiguration($this->linterConfiguration, [$this->config]); |
|
| 121 | 121 | $this->linterConfiguration->setConfiguration($linterConfig); |
| 122 | 122 | return $this->linterConfiguration; |
| 123 | 123 | } |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | final class Operator |
| 7 | 7 | { |
| 8 | 8 | private const EQUAL = '='; |
| 9 | - private const REFERENCE = '=<'; |
|
| 9 | + private const REFERENCE = '=<'; |
|
| 10 | 10 | private const COPY = '<'; |
| 11 | 11 | private const DELETE = '>'; |
| 12 | 12 | private const MODIFICATION = ':='; |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | $array = explode('(', $string); |
| 96 | 96 | $array[1] = trim(rtrim(trim($array[1]), ')')); |
| 97 | 97 | } else { |
| 98 | - $array = array_filter(explode((string)$this->operator, $string)); |
|
| 98 | + $array = array_filter(explode((string) $this->operator, $string)); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | if (!isset($array[1])) { |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | public function add(AbstractIssue $issue): void |
| 20 | 20 | { |
| 21 | 21 | $this->issues[] = $issue; |
| 22 | - usort($this->issues, static function ($a, $b) { |
|
| 22 | + usort($this->issues, static function($a, $b) { |
|
| 23 | 23 | /** @var AbstractIssue $a */ |
| 24 | 24 | /** @var AbstractIssue $b */ |
| 25 | 25 | if ($a->line() > $b->line()) { |