Skip to content

Commit

Permalink
Fix: Namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Dec 24, 2023
1 parent 756fa63 commit ea4a151
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
10 changes: 6 additions & 4 deletions test/Unit/FixersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* @see https://github.com/ergebnis/php-cs-fixer-config
*/

namespace Ergebnis\PhpCsFixer\Config\Test\Unit;

use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Test;
use PhpCsFixer\Fixer;
Expand Down Expand Up @@ -58,13 +60,13 @@ public function testFromIterableRejectsIterableWhenItIsASimpleType(): void

public function testFromIterableRejectsIterableWhenItIsNotATraversable(): void
{
$iterable = new stdClass();
$iterable = new \stdClass();

$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage(\sprintf(
'Expected iterable to be an array or implement %s, got %s instead.',
\Traversable::class,
stdClass::class,
\stdClass::class,
));

Fixers::fromIterable($iterable);
Expand All @@ -82,7 +84,7 @@ public function testFromIterableRejectsIterableWhenItDoesNotContainFixersOnly():
$this->expectExceptionMessage(\sprintf(
'Expected iterable to contain only instances of %s, got %s instead.',
Fixer\FixerInterface::class,
stdClass::class,
\stdClass::class,
));

Fixers::fromIterable($iterable);
Expand All @@ -109,7 +111,7 @@ public function testFromIterableReturnsFixersWhenValueIsTraversable(): void
$this->createStub(Fixer\FixerInterface::class),
];

$iterable = new ArrayIterator($value);
$iterable = new \ArrayIterator($value);

$fixers = Fixers::fromIterable($iterable);

Expand Down
2 changes: 2 additions & 0 deletions test/Unit/NameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* @see https://github.com/ergebnis/php-cs-fixer-config
*/

namespace Ergebnis\PhpCsFixer\Config\Test\Unit;

use Ergebnis\DataProvider;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\Test;
Expand Down
2 changes: 2 additions & 0 deletions test/Unit/PhpVersionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* @see https://github.com/ergebnis/php-cs-fixer-config
*/

namespace Ergebnis\PhpCsFixer\Config\Test\Unit;

use Ergebnis\DataProvider;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
use Ergebnis\PhpCsFixer\Config\Test;
Expand Down
4 changes: 3 additions & 1 deletion test/Unit/RuleSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* @see https://github.com/ergebnis/php-cs-fixer-config
*/

namespace Ergebnis\PhpCsFixer\Config\Test\Unit;

use Ergebnis\PhpCsFixer\Config\Fixers;
use Ergebnis\PhpCsFixer\Config\Name;
use Ergebnis\PhpCsFixer\Config\PhpVersion;
Expand Down Expand Up @@ -193,7 +195,7 @@ public function testWithHeaderReturnsRuleSetWithEnabledHeaderCommentFixer(string
}

/**
* @return Generator<string, array{0: string}>
* @return \Generator<string, array{0: string}>
*/
public static function provideValidHeader(): iterable
{
Expand Down
2 changes: 2 additions & 0 deletions test/Unit/RulesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* @see https://github.com/ergebnis/php-cs-fixer-config
*/

namespace Ergebnis\PhpCsFixer\Config\Test\Unit;

use Ergebnis\PhpCsFixer\Config\Rules;
use Ergebnis\PhpCsFixer\Config\Test;
use PHPUnit\Framework;
Expand Down

0 comments on commit ea4a151

Please sign in to comment.