Skip to content

Commit 5bf3b17

Browse files
authored
add braces in correct spots (#632)
1 parent f5c7f6b commit 5bf3b17

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/Application/Console/Formatters/Console.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public function formatFix(InsightCollection $insightCollection, array $metrics):
197197
if ($insight->getTotalFix() === 0) {
198198
continue;
199199
}
200-
$fix = "<fg=green>• [$category] </><bold>{$insight->getTitle()}</bold>:";
200+
$fix = "<fg=green>• [{$category}] </><bold>{$insight->getTitle()}</bold>:";
201201

202202
$details = $insight->getFixPerFile();
203203
/** @var Details $detail */
@@ -380,7 +380,7 @@ private function issues(InsightCollection $insightCollection, array $metrics, st
380380

381381
$previousCategory = $category;
382382

383-
$issue = "\n<fg=red>•</> [$category] <bold>{$insight->getTitle()}</bold>";
383+
$issue = "\n<fg=red>•</> [{$category}] <bold>{$insight->getTitle()}</bold>";
384384

385385
if (! $insight instanceof HasDetails && ! $this->style->getOutput()->isVerbose()) {
386386
$this->style->writeln($issue);
@@ -419,7 +419,7 @@ private function issues(InsightCollection $insightCollection, array $metrics, st
419419
$detailString .= ($detailString !== '' ? ': ' : '') . $this->parseDetailMessage($detail);
420420
}
421421

422-
$issue .= "\n $detailString";
422+
$issue .= "\n {$detailString}";
423423
}
424424

425425
if (! $this->style->getOutput()->isVerbose() && $totalDetails > 3) {

src/Domain/Insights/CyclomaticComplexityIsHigh.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function process(): void
5151

5252
$this->details = array_map(static fn ($class, $complexity): Details => Details::make()
5353
->setFile($class)
54-
->setMessage("$complexity cyclomatic complexity"), array_keys($classesComplexity), $classesComplexity);
54+
->setMessage("{$complexity} cyclomatic complexity"), array_keys($classesComplexity), $classesComplexity);
5555
}
5656

5757
private function getMaxComplexity(): int

src/Domain/Insights/ForbiddenGlobals.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function getDetails(): array
3636
}
3737

3838
$details[] = Details::make()->setFile($file)->setMessage(
39-
"Usage of $global found; Usage of GLOBALS are discouraged consider not relying on global scope"
39+
"Usage of {$global} found; Usage of GLOBALS are discouraged consider not relying on global scope"
4040
);
4141
}
4242

src/Domain/Insights/ForbiddenSecurityIssues.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private function addIssuesDetails(string $packageName, string $version, array $i
146146
continue;
147147
}
148148
self::$details[] = Details::make()->setMessage(
149-
"$packageName@$version {$issue['title']} - {$issue['link']}"
149+
"{$packageName}@{$version} {$issue['title']} - {$issue['link']}"
150150
);
151151
}
152152
}

src/Domain/Results.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,6 @@ private function getInsightByCategory(string $insightClass, string $category): I
170170
}
171171
}
172172

173-
throw new InsightClassNotFound("$insightClass not found in $category");
173+
throw new InsightClassNotFound("{$insightClass} not found in {$category}");
174174
}
175175
}

0 commit comments

Comments
 (0)