Skip to content

Commit

Permalink
Update cs-fixer & run
Browse files Browse the repository at this point in the history
  • Loading branch information
AydinHassan committed Sep 4, 2024
1 parent 35ef773 commit 73febf8
Show file tree
Hide file tree
Showing 8 changed files with 857 additions and 134 deletions.
2 changes: 1 addition & 1 deletion src/Check/CodeExistsCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function getName(): string
*/
public function check(ExecutionContext $context): ResultInterface
{
$noopHandler = new class () implements ErrorHandler {
$noopHandler = new class implements ErrorHandler {
public function handleError(Error $error): void {}
};

Expand Down
2 changes: 1 addition & 1 deletion src/ExerciseRunner/Context/TestContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function importReferenceSolution(): void
);
}

$scenario = new class () extends ExerciseScenario {};
$scenario = new class extends ExerciseScenario {};
if ($this->exercise instanceof CliExercise || $this->exercise instanceof CgiExercise) {
$scenario = $this->exercise->defineTestScenario();
}
Expand Down
2 changes: 1 addition & 1 deletion test/CodePatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function codeProvider(): array
'transformer-class' => [
'<?php $original = true;',
(new Patch())
->withTransformer(new class () implements Patch\Transformer {
->withTransformer(new class implements Patch\Transformer {
public function transform(array $statements): array
{
return [
Expand Down
4 changes: 2 additions & 2 deletions test/Event/EventDispatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function testRemoveLazyListeners(): void
{
$container = $this->createMock(ContainerInterface::class);

$myListener = new class () {
$myListener = new class {
public function __invoke() {}
};

Expand All @@ -193,7 +193,7 @@ public function testRemoveLazyListenersWithAlternateMethod(): void
{
$container = $this->createMock(ContainerInterface::class);

$myListener = new class () {
$myListener = new class {
public function myMethod() {}
};

Expand Down
6 changes: 3 additions & 3 deletions test/Listener/LazyContainerListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class LazyContainerListenerTest extends TestCase
{
public function testExceptionIsThrownIfServiceMethodDoesNotExist(): void
{
$myListener = new class () {
$myListener = new class {
public function __invoke() {}
};

Expand All @@ -39,7 +39,7 @@ public function __invoke() {}

public function testThatUnderlyingListenerIsCalled(): void
{
$myListener = new class () {
$myListener = new class {
public $called = false;
public function __invoke()
{
Expand All @@ -66,7 +66,7 @@ public function __invoke()

public function testWrappedReturnsUnderlyingListener(): void
{
$myListener = new class () {
$myListener = new class {
public function __invoke() {}
};

Expand Down
2 changes: 1 addition & 1 deletion test/Markdown/Parser/HandleBarParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function testWithShorthand(string $content, bool $expectedParseResult, ar
$context->expects($this->never())->method('getContainer');
}

$shorthand = new class () implements ShorthandInterface {
$shorthand = new class implements ShorthandInterface {
public $args = [];
public function __invoke(array $callArgs): array
{
Expand Down
4 changes: 2 additions & 2 deletions test/PatchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testWithTransformerWithClosure(): void
public function testWithTransformerWithTransformer(): void
{
$patch = new Patch();
$transformer = new class () implements Patch\Transformer {
$transformer = new class implements Patch\Transformer {
public function transform(array $ast): array
{
return $ast;
Expand All @@ -49,7 +49,7 @@ public function transform(array $ast): array

public function testWithTransformerMultiple(): void
{
$transformer1 = new class () implements Patch\Transformer {
$transformer1 = new class implements Patch\Transformer {
public function transform(array $ast): array
{
return $ast;
Expand Down
Loading

0 comments on commit 73febf8

Please sign in to comment.