Skip to content

Commit 1cf9a3f

Browse files
Fix CS/WS issues
1 parent 9b5d075 commit 1cf9a3f

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

tests/_files/NotSelfDescribingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ public function count(): int
2424

2525
public function run(TestResult $result = null): TestResult
2626
{
27-
return new TestResult();
27+
return new TestResult;
2828
}
2929
}

tests/_files/TestWithDifferentStatuses.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function testThatFails(): void
1818

1919
public function testThatErrors(): void
2020
{
21-
throw new \Exception();
21+
throw new \Exception;
2222
}
2323

2424
public function testThatPasses(): void

tests/end-to-end/regression/GitHub/3739/Issue3739Test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ final class Issue3739Test extends TestCase
2929
{
3030
public function testWithErrorSuppression(): void
3131
{
32-
$this->assertFalse((new Issue3739())->unlinkFileThatDoesNotExistWithErrorSuppression());
32+
$this->assertFalse((new Issue3739)->unlinkFileThatDoesNotExistWithErrorSuppression());
3333
}
3434

3535
public function testWithoutErrorSuppression(): void
3636
{
37-
$this->assertFalse((new Issue3739())->unlinkFileThatDoesNotExistWithoutErrorSuppression());
37+
$this->assertFalse((new Issue3739)->unlinkFileThatDoesNotExistWithoutErrorSuppression());
3838
}
3939
}

tests/end-to-end/regression/GitHub/3904/Issue3904_3Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ final class Issue3904_3TestSuiteLoader
2121
{
2222
public static function suite()
2323
{
24-
return new Issue3904Test();
24+
return new Issue3904Test;
2525
}
2626
}

tests/unit/Framework/MockObject/Builder/InvocationMockerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function testWillReturnFailsWhenTryingToReturnSingleIncompatibleClass():
143143

144144
$this->expectException(IncompatibleReturnValueException::class);
145145
$this->expectExceptionMessage('Method methodWithClassReturnTypeDeclaration may not return value of type Foo, its return declaration is ": stdClass"');
146-
$invocationMocker->willReturn(new Foo());
146+
$invocationMocker->willReturn(new Foo);
147147
}
148148

149149
public function testWillReturnAllowsMatchersForMultipleMethodsWithDifferentReturnTypes(): void
@@ -152,7 +152,7 @@ public function testWillReturnAllowsMatchersForMultipleMethodsWithDifferentRetur
152152
$mock = $this->getMockBuilder(ClassWithAllPossibleReturnTypes::class)
153153
->getMock();
154154

155-
$invocationMocker = $mock->method(new \PHPUnit\Framework\Constraint\IsAnything());
155+
$invocationMocker = $mock->method(new \PHPUnit\Framework\Constraint\IsAnything);
156156
$invocationMocker->willReturn(true, 1);
157157

158158
$this->assertEquals(true, $mock->methodWithBoolReturnTypeDeclaration());
@@ -254,7 +254,7 @@ public function testWillReturnAlreadyInstantiatedStubs(): void
254254

255255
$mock->expects($this->any())
256256
->method('bar')
257-
->willReturn(new ReturnSelf());
257+
->willReturn(new ReturnSelf);
258258

259259
$this->assertSame('foo', $mock->foo());
260260
$this->assertSame($mock, $mock->bar());

tests/unit/Framework/TestCaseTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ public function testGetNameReturnsMethodName(): void
10701070

10711071
public function testGetNameReturnsEmptyStringAsDefault(): void
10721072
{
1073-
$testCase = new TestWithDifferentNames();
1073+
$testCase = new TestWithDifferentNames;
10741074

10751075
$this->assertSame('', $testCase->getName());
10761076
}
@@ -1099,7 +1099,7 @@ public function providerInvalidName(): array
10991099

11001100
public function testHasFailedReturnsFalseWhenTestHasNotRunYet(): void
11011101
{
1102-
$test = new TestWithDifferentStatuses();
1102+
$test = new TestWithDifferentStatuses;
11031103

11041104
$this->assertSame(BaseTestRunner::STATUS_UNKNOWN, $test->getStatus());
11051105
$this->assertFalse($test->hasFailed());

tests/unit/Framework/TestFailureTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function testToStringForError(): void
3838

3939
public function testToStringForNonSelfDescribing(): void
4040
{
41-
$test = new NotSelfDescribingTest();
41+
$test = new NotSelfDescribingTest;
4242
$exception = new Exception('message');
4343
$failure = new TestFailure($test, $exception);
4444

0 commit comments

Comments
 (0)