Skip to content

Commit 845b6be

Browse files
Merge branch '8.5' into 9.5
2 parents 4756864 + 1cf9a3f commit 845b6be

File tree

12 files changed

+24
-21
lines changed

12 files changed

+24
-21
lines changed

.phive/phars.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
33
<phar name="phpab" version="^1.25" installed="1.27.1" location="./tools/phpab" copy="true"/>
4-
<phar name="php-cs-fixer" version="^3.0" installed="3.6.0" location="./tools/php-cs-fixer" copy="true"/>
4+
<phar name="php-cs-fixer" version="^3.0" installed="3.7.0" location="./tools/php-cs-fixer" copy="true"/>
55
<phar name="phpdox" version="^0.12" installed="0.12.0" location="./tools/phpdox" copy="true"/>
66
<phar name="phploc" version="^4.0" installed="4.0.1" location="./tools/phploc" copy="true"/>
77
<phar name="psalm" version="^4.0" installed="4.22.0" location="./tools/psalm" copy="true"/>

.php-cs-fixer.dist.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@
130130
'native_function_casing' => false,
131131
'native_function_invocation' => false,
132132
'native_function_type_declaration_casing' => true,
133-
'new_with_braces' => false,
133+
'new_with_braces' => [
134+
'named_class' => false,
135+
'anonymous_class' => false,
136+
],
134137
'no_alias_functions' => true,
135138
'no_alias_language_construct_call' => true,
136139
'no_alternative_syntax' => true,

tests/_files/NotReorderableTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function count(): int
1919

2020
public function run(TestResult $result = null): TestResult
2121
{
22-
return new TestResult();
22+
return new TestResult;
2323
}
2424

2525
public function provides(): array

tests/_files/TestWithDifferentStatuses.php

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

2222
public function testThatErrors(): void
2323
{
24-
throw new Exception();
24+
throw new Exception;
2525
}
2626

2727
public function testThatPasses(): void

tests/end-to-end/no-log-cc-override/_files/NoLogNoCcTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ final class NoLogNoCcTest extends TestCase
1616
{
1717
public function testSuccess(): void
1818
{
19-
$this->assertTrue((new NoLogNoCc())->getTrue());
19+
$this->assertTrue((new NoLogNoCc)->getTrue());
2020
}
2121
}

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/unit/Framework/Constraint/LogicalExpressionsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function testLogicalNotOfDegenerateLogicalAnd(): void
2121
{
2222
$constraint = new LogicalNot(
2323
LogicalAnd::fromConstraints(
24-
new IsNull(),
24+
new IsNull,
2525
)
2626
);
2727

@@ -70,7 +70,7 @@ public function testLogicalNotOfDegenerateLogicalOr(): void
7070
{
7171
$constraint = new LogicalNot(
7272
LogicalOr::fromConstraints(
73-
new IsNull(),
73+
new IsNull,
7474
)
7575
);
7676

@@ -91,7 +91,7 @@ public function testLogicalNotOfLogicalOrWithThreeArguments(): void
9191
{
9292
$constraint = new LogicalNot(
9393
LogicalOr::fromConstraints(
94-
new IsNull(),
94+
new IsNull,
9595
new IsType('int'),
9696
new IsType('array')
9797
)
@@ -118,7 +118,7 @@ public function testLogicalNotOfDegenerateLogicalXor(): void
118118
{
119119
$constraint = new LogicalNot(
120120
LogicalXor::fromConstraints(
121-
new IsNull(),
121+
new IsNull,
122122
)
123123
);
124124

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

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

142142
$this->expectException(IncompatibleReturnValueException::class);
143143
$this->expectExceptionMessage('Method methodWithClassReturnTypeDeclaration may not return value of type Foo, its declared return type is "stdClass"');
144-
$invocationMocker->willReturn(new Foo());
144+
$invocationMocker->willReturn(new Foo);
145145
}
146146

147147
public function testWillReturnAllowsMatchersForMultipleMethodsWithDifferentReturnTypes(): void
@@ -150,7 +150,7 @@ public function testWillReturnAllowsMatchersForMultipleMethodsWithDifferentRetur
150150
$mock = $this->getMockBuilder(ClassWithAllPossibleReturnTypes::class)
151151
->getMock();
152152

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

156156
$this->assertEquals(true, $mock->methodWithBoolReturnTypeDeclaration());
@@ -247,7 +247,7 @@ public function testWillReturnAlreadyInstantiatedStubs(): void
247247
->willReturn(new ReturnStub('foo'));
248248

249249
$mock->method('bar')
250-
->willReturn(new ReturnSelf());
250+
->willReturn(new ReturnSelf);
251251

252252
$this->assertSame('foo', $mock->foo());
253253
$this->assertSame($mock, $mock->bar());

tests/unit/Framework/TestCaseTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,8 +1084,8 @@ public function testSizeSmall(): void
10841084

10851085
public function testCanUseDependsToDependOnSuccessfulClass(): void
10861086
{
1087-
$result = new TestResult();
1088-
$suite = new TestSuite();
1087+
$result = new TestResult;
1088+
$suite = new TestSuite;
10891089
$suite->addTestSuite(DependencySuccessTest::class);
10901090
$suite->addTestSuite(DependencyFailureTest::class);
10911091
$suite->addTestSuite(DependencyOnClassTest::class);
@@ -1117,7 +1117,7 @@ public function testGetNameReturnsMethodName(): void
11171117

11181118
public function testGetNameReturnsEmptyStringAsDefault(): void
11191119
{
1120-
$testCase = new TestWithDifferentNames();
1120+
$testCase = new TestWithDifferentNames;
11211121

11221122
$this->assertSame('', $testCase->getName());
11231123
}
@@ -1146,7 +1146,7 @@ public function providerInvalidName(): array
11461146

11471147
public function testHasFailedReturnsFalseWhenTestHasNotRunYet(): void
11481148
{
1149-
$test = new TestWithDifferentStatuses();
1149+
$test = new TestWithDifferentStatuses;
11501150

11511151
$this->assertSame(BaseTestRunner::STATUS_UNKNOWN, $test->getStatus());
11521152
$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)