Skip to content

Commit

Permalink
Fix CS/WS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 8, 2022
1 parent 9b5d075 commit 1cf9a3f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tests/_files/NotSelfDescribingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public function count(): int

public function run(TestResult $result = null): TestResult
{
return new TestResult();
return new TestResult;
}
}
2 changes: 1 addition & 1 deletion tests/_files/TestWithDifferentStatuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function testThatFails(): void

public function testThatErrors(): void
{
throw new \Exception();
throw new \Exception;
}

public function testThatPasses(): void
Expand Down
4 changes: 2 additions & 2 deletions tests/end-to-end/regression/GitHub/3739/Issue3739Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ final class Issue3739Test extends TestCase
{
public function testWithErrorSuppression(): void
{
$this->assertFalse((new Issue3739())->unlinkFileThatDoesNotExistWithErrorSuppression());
$this->assertFalse((new Issue3739)->unlinkFileThatDoesNotExistWithErrorSuppression());
}

public function testWithoutErrorSuppression(): void
{
$this->assertFalse((new Issue3739())->unlinkFileThatDoesNotExistWithoutErrorSuppression());
$this->assertFalse((new Issue3739)->unlinkFileThatDoesNotExistWithoutErrorSuppression());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ final class Issue3904_3TestSuiteLoader
{
public static function suite()
{
return new Issue3904Test();
return new Issue3904Test;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function testWillReturnFailsWhenTryingToReturnSingleIncompatibleClass():

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

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

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

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

$mock->expects($this->any())
->method('bar')
->willReturn(new ReturnSelf());
->willReturn(new ReturnSelf);

$this->assertSame('foo', $mock->foo());
$this->assertSame($mock, $mock->bar());
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Framework/TestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ public function testGetNameReturnsMethodName(): void

public function testGetNameReturnsEmptyStringAsDefault(): void
{
$testCase = new TestWithDifferentNames();
$testCase = new TestWithDifferentNames;

$this->assertSame('', $testCase->getName());
}
Expand Down Expand Up @@ -1099,7 +1099,7 @@ public function providerInvalidName(): array

public function testHasFailedReturnsFalseWhenTestHasNotRunYet(): void
{
$test = new TestWithDifferentStatuses();
$test = new TestWithDifferentStatuses;

$this->assertSame(BaseTestRunner::STATUS_UNKNOWN, $test->getStatus());
$this->assertFalse($test->hasFailed());
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Framework/TestFailureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testToStringForError(): void

public function testToStringForNonSelfDescribing(): void
{
$test = new NotSelfDescribingTest();
$test = new NotSelfDescribingTest;
$exception = new Exception('message');
$failure = new TestFailure($test, $exception);

Expand Down

0 comments on commit 1cf9a3f

Please sign in to comment.