Skip to content

Commit

Permalink
Merge branch '2.x' into 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Jul 24, 2024
2 parents 41fa4d2 + 147f8b6 commit 2ff5024
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 16 deletions.
9 changes: 0 additions & 9 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"license": "MIT",
"require": {
"php": "^8.2",
"phpstan/phpstan": "^1.11.7",
"phpstan/phpstan": "^1.11.8",
"tomasvotruba/type-coverage": "^0.3.1",
"pestphp/pest-plugin": "^3.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Analyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class Analyser
*/
public static function analyse(array $files, Closure $callback): void
{
$testCase = new TestCaseForTypeCoverage();
$testCase = new TestCaseForTypeCoverage;

foreach ($files as $file) {
$errors = $testCase->gatherAnalyserErrors([$file]);
Expand Down
3 changes: 2 additions & 1 deletion src/PHPStanAnalyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,15 @@ public static function make(Container $container, array $rules, array $collector
true,
false,
true,
false,
);

$fileAnalyser = new FileAnalyser(
$scopeFactory,
$nodeScopeResolver,
$container->getService('defaultAnalysisParser'), // @phpstan-ignore-line
$container->getByType(DependencyResolver::class),
new RuleErrorTransformer(),
new RuleErrorTransformer,
$container->getByType(LocalIgnoresProcessor::class),
);

Expand Down
2 changes: 1 addition & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Plugin implements HandlesArguments
public function __construct(
private readonly OutputInterface $output
) {
$this->coverageLogger = new NullLogger();
$this->coverageLogger = new NullLogger;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/TestCaseForTypeCoverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function gatherAnalyserErrors(array $files): array
}

$actualErrors = $analyserResult->getUnorderedErrors();
$ruleErrorTransformer = new RuleErrorTransformer();
$ruleErrorTransformer = new RuleErrorTransformer;
if ($analyserResult->getCollectedData() !== []) {
$ruleRegistry = new DirectRegistry($this->getRules());
$nodeType = CollectedDataNode::class;
Expand Down
4 changes: 2 additions & 2 deletions tests/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Symfony\Component\Console\Output\BufferedOutput;

test('output', function () {
$output = new BufferedOutput();
$output = new BufferedOutput;
$plugin = new class($output) extends Plugin
{
public function exit(int $code): never
Expand All @@ -25,7 +25,7 @@ public function exit(int $code): never
});

test('it can output to json', function () {
$output = new BufferedOutput();
$output = new BufferedOutput;
$plugin = new class($output) extends Plugin
{
public function exit(int $code): never
Expand Down

0 comments on commit 2ff5024

Please sign in to comment.