Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @see https://github.com/ergebnis/phpunit-slow-test-detector
*/

use Ergebnis\Rector;
use Rector\Config;
use Rector\ValueObject;

Expand All @@ -25,4 +26,10 @@
]);

$rectorConfig->phpVersion(ValueObject\PhpVersion::PHP_70);

$rectorConfig->ruleWithConfiguration(Rector\Rules\Files\ReferenceNamespacedSymbolsRelativeToNamespacePrefixRector::class, [
'parentNamespacePrefixes' => [
'Ergebnis\PHPUnit\SlowTestDetector',
],
]);
};
6 changes: 2 additions & 4 deletions src/SlowTestList.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

namespace Ergebnis\PHPUnit\SlowTestDetector;

use Ergebnis\PHPUnit\SlowTestDetector\Comparator\DurationComparator;

/**
* @internal
*/
Expand Down Expand Up @@ -68,7 +66,7 @@ public function limitTo(MaximumCount $maximumCount): self

public function sortByDurationDescending(): self
{
$durationComparator = new DurationComparator();
$durationComparator = new Comparator\DurationComparator();

$slowTests = $this->slowTests;

Expand All @@ -84,7 +82,7 @@ public function sortByDurationDescending(): self

public function sortByMaximumDurationDescending(): self
{
$durationComparator = new DurationComparator();
$durationComparator = new Comparator\DurationComparator();

$slowTests = $this->slowTests;

Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Reporter/Console/DurationFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function testFormatFormats(
}

/**
* @return \Generator<string, array{0: \Ergebnis\PHPUnit\SlowTestDetector\Reporter\Console\Unit, 1: Duration, 2: string}>
* @return \Generator<string, array{0: Reporter\Console\Unit, 1: Duration, 2: string}>
*/
public static function provideDurationUnitAndFormattedDuration(): iterable
{
Expand Down
4 changes: 2 additions & 2 deletions test/Unit/Reporter/Console/UnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function testFromDurationReturnsExpectedUnit(
}

/**
* @return \Generator<string, array{0: \Ergebnis\PHPUnit\SlowTestDetector\Reporter\Console\Unit, 1: Duration}>
* @return \Generator<string, array{0: Reporter\Console\Unit, 1: Duration}>
*/
public static function provideExpectedUnitAndDuration(): iterable
{
Expand Down Expand Up @@ -146,7 +146,7 @@ public function testFromDurationsReturnsLargestUnit(
}

/**
* @return \Generator<string, array{0: \Ergebnis\PHPUnit\SlowTestDetector\Reporter\Console\Unit, 1: list<Duration>}>
* @return \Generator<string, array{0: Reporter\Console\Unit, 1: list<Duration>}>
*/
public static function provideExpectedUnitAndDurations(): iterable
{
Expand Down
Loading