Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Sep 8, 2024
1 parent cc56a26 commit 8a79666
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions monorepo/HydeStan/HydeStan.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class NoSetUpTearDownInUnitTestCaseAnalyser extends FileAnalyser
{
public function run(string $file, string $contents): void
{
if (!str_contains($contents, 'extends UnitTestCase')) {
if (! str_contains($contents, 'extends UnitTestCase')) {
return;
}

Expand All @@ -398,7 +398,7 @@ public function run(string $file, string $contents): void
AnalysisStatisticsContainer::analysedExpression();
if (preg_match("/function\s+$method\s*\(/", $contents)) {
$lineNumber = substr_count(substr($contents, 0, strpos($contents, "function $method")), "\n") + 1;
$this->fail(sprintf("Found %s method in UnitTestCase at %s", $method, fileLink($file, $lineNumber)));
$this->fail(sprintf('Found %s method in UnitTestCase at %s', $method, fileLink($file, $lineNumber)));
HydeStan::addActionsMessage('error', $file, $lineNumber, "HydeStan: Unnecessary{$method}MethodError", "{$method} method in UnitTestCase performs no operation and should be removed.");
}
}
Expand Down

0 comments on commit 8a79666

Please sign in to comment.