Skip to content

Commit ac65494

Browse files
committed
Auto-apply fixes
1 parent 001e2c3 commit ac65494

File tree

8 files changed

+18
-11
lines changed

8 files changed

+18
-11
lines changed

build/phpstan.neon

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,17 @@ parameters:
9191
identifier: shipmonk.deadMethod
9292
path: ../src/Reflection/BetterReflection/SourceLocator/FileReadTrapStreamWrapper.php
9393
-
94-
message: '#Fetching class constant class of deprecated class DeprecatedAnnotations\\DeprecatedFoo.#'
94+
message: '''
95+
#^Access to constant on deprecated class DeprecatedAnnotations\\DeprecatedFoo\:
96+
in 1\.0\.0\.$#
97+
'''
9598
path: ../tests/PHPStan/Reflection/Annotations/DeprecatedAnnotationsTest.php
9699
-
97-
message: '#Fetching class constant class of deprecated class DeprecatedAnnotations\\DeprecatedWithMultipleTags.#'
100+
message: '''
101+
#^Access to constant on deprecated class DeprecatedAnnotations\\DeprecatedWithMultipleTags\:
102+
in Foo 1\.1\.0 and will be removed in 1\.5\.0, use
103+
\\Foo\\Bar\\NotDeprecated instead\.$#
104+
'''
98105
path: ../tests/PHPStan/Reflection/Annotations/DeprecatedAnnotationsTest.php
99106
-
100107
message: '#^Variable property access on T of PHPStan\\Rules\\RuleError\.$#'

tests/PHPStan/Command/ErrorFormatter/GithubErrorFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testFormatErrors(
9595
$this->getOutput(),
9696
), sprintf('%s: response code do not match', $message));
9797

98-
$this->assertEquals($expected, $this->getOutputContent(), sprintf('%s: output do not match', $message));
98+
$this->assertSame($expected, $this->getOutputContent(), sprintf('%s: output do not match', $message));
9999
}
100100

101101
}

tests/PHPStan/Command/ErrorFormatter/RawErrorFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function testFormatErrors(
122122
$this->getOutput(false, $verbose),
123123
), sprintf('%s: response code do not match', $message));
124124

125-
$this->assertEquals($expected, $this->getOutputContent(false, $verbose), sprintf('%s: output do not match', $message));
125+
$this->assertSame($expected, $this->getOutputContent(false, $verbose), sprintf('%s: output do not match', $message));
126126
}
127127

128128
}

tests/PHPStan/Command/ErrorFormatter/TableErrorFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public function testFormatErrors(
257257
$this->getOutput(false, $verbose),
258258
), sprintf('%s: response code do not match', $message));
259259

260-
$this->assertEquals($expected, $this->getOutputContent(false, $verbose), sprintf('%s: output do not match', $message));
260+
$this->assertSame($expected, $this->getOutputContent(false, $verbose), sprintf('%s: output do not match', $message));
261261
}
262262

263263
public function testEditorUrlWithTrait(): void

tests/PHPStan/Command/ErrorFormatter/TeamcityErrorFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function testFormatErrors(
115115
$this->getOutput(),
116116
), sprintf('%s: response code do not match', $message));
117117

118-
$this->assertEquals($expected, $this->getOutputContent(), sprintf('%s: output do not match', $message));
118+
$this->assertSame($expected, $this->getOutputContent(), sprintf('%s: output do not match', $message));
119119
}
120120

121121
}

tests/PHPStan/Parser/CachedParserTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function testParseFileClearCache(
2525
$cachedNodesByStringCountMax,
2626
);
2727

28-
$this->assertEquals(
28+
$this->assertSame(
2929
$cachedNodesByStringCountMax,
3030
$parser->getCachedNodesByStringCountMax(),
3131
);
@@ -35,7 +35,7 @@ public function testParseFileClearCache(
3535
$parser->parseString('string' . $i);
3636
}
3737

38-
$this->assertEquals(
38+
$this->assertSame(
3939
$cachedNodesByStringCountExpected,
4040
$parser->getCachedNodesByStringCount(),
4141
);

tests/PHPStan/Type/Generic/TemplateTypeHelperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function testIssue2512(): void
2929
TemplateTypeVariance::createInvariant(),
3030
);
3131

32-
$this->assertEquals(
32+
$this->assertSame(
3333
'T (function a(), parameter)',
3434
$type->describe(VerbosityLevel::precise()),
3535
);
@@ -46,7 +46,7 @@ public function testIssue2512(): void
4646
TemplateTypeVariance::createInvariant(),
4747
);
4848

49-
$this->assertEquals(
49+
$this->assertSame(
5050
'DateTime&T (function a(), parameter)',
5151
$type->describe(VerbosityLevel::precise()),
5252
);

tests/PHPStan/Type/UnionTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function testSelfCompare(Type $type): void
154154
$type->equals($type),
155155
sprintf('%s -> equals(itself)', $description),
156156
);
157-
$this->assertEquals(
157+
$this->assertSame(
158158
'Yes',
159159
$type->isSuperTypeOf($type)->describe(),
160160
sprintf('%s -> isSuperTypeOf(itself)', $description),

0 commit comments

Comments
 (0)