Skip to content

Commit 2171717

Browse files
committed
Rename duplicate symbols
1 parent c09be9e commit 2171717

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+138
-81
lines changed

tests/PHPStan/Analyser/LegacyNodeScopeResolverTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3865,11 +3865,11 @@ public function testTypeFromMethodPhpDocsInheritDocWithoutCurlyBraces(
38653865
): void
38663866
{
38673867
if ($replaceClass) {
3868-
$description = str_replace('$this(MethodPhpDocsNamespace\Foo)', '$this(MethodPhpDocsNamespace\FooInheritDocChild)', $description);
3869-
$description = str_replace('static(MethodPhpDocsNamespace\Foo)', 'static(MethodPhpDocsNamespace\FooInheritDocChild)', $description);
3868+
$description = str_replace('$this(MethodPhpDocsNamespace\Foo)', '$this(MethodPhpDocsNamespace\FooInheritDocChildWithoutCurly)', $description);
3869+
$description = str_replace('static(MethodPhpDocsNamespace\Foo)', 'static(MethodPhpDocsNamespace\FooInheritDocChildWithoutCurly)', $description);
38703870
$description = str_replace('MethodPhpDocsNamespace\FooParent', 'MethodPhpDocsNamespace\Foo', $description);
38713871
if ($expression === '$inlineSelf') {
3872-
$description = 'MethodPhpDocsNamespace\FooInheritDocChild';
3872+
$description = 'MethodPhpDocsNamespace\FooInheritDocChildWithoutCurly';
38733873
}
38743874
}
38753875
$this->assertTypes(
@@ -4359,7 +4359,7 @@ public function dataForeachArrayType(): array
43594359
],
43604360
[
43614361
__DIR__ . '/data/foreach/foreach-iterable-with-specified-key-type.php',
4362-
'ForeachWithGenericsPhpDoc\Bar|ForeachWithGenericsPhpDoc\Foo',
4362+
'ForeachWithGenericsPhpDocIterable\Bar|ForeachWithGenericsPhpDocIterable\Foo',
43634363
'$key',
43644364
],
43654365
[
@@ -4369,7 +4369,7 @@ public function dataForeachArrayType(): array
43694369
],
43704370
[
43714371
__DIR__ . '/data/foreach/foreach-iterable-with-complex-value-type.php',
4372-
'float|ForeachWithComplexValueType\Foo',
4372+
'float|ForeachIterableWithComplexValueType\Foo',
43734373
'$value',
43744374
],
43754375
[

tests/PHPStan/Analyser/data/array-filter-arrow-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php // lint >= 7.4
22

3-
namespace ArrayFilter;
3+
namespace ArrayFilterArrowFunctions;
44

55
use function PHPStan\Testing\assertType;
66

tests/PHPStan/Analyser/data/array-filter-callables.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace ArrayFilter;
3+
namespace ArrayFilterCallables;
44

55
use function PHPStan\Testing\assertType;
66

tests/PHPStan/Analyser/data/array-filter-string-callables.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace ArrayFilter;
3+
namespace ArrayFilterStringCallables;
44

55
use function PHPStan\Testing\assertType;
66

tests/PHPStan/Analyser/data/bug-2600-php8.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Bug2600;
3+
namespace Bug2600Php8;
44

55
use function PHPStan\Testing\assertType;
66

tests/PHPStan/Analyser/data/bug-4188.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php // lint >= 7.4
22

3-
namespace Bug4188;
3+
namespace Bug4188Types;
44

55
interface A {}
66
interface B {}
@@ -18,7 +18,7 @@ function ($param): bool {
1818
return $param instanceof B;
1919
},
2020
);
21-
assertType('array<Bug4188\B>', $filtered);
21+
assertType('array<Bug4188Types\B>', $filtered);
2222

2323
$this->onlyB($filtered);
2424
}
@@ -30,7 +30,7 @@ public function setShort(array $data): void
3030
$data,
3131
fn($param): bool => $param instanceof B,
3232
);
33-
assertType('array<Bug4188\B>', $filtered);
33+
assertType('array<Bug4188Types\B>', $filtered);
3434

3535
$this->onlyB($filtered);
3636
}

tests/PHPStan/Analyser/data/bug-4885.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php // lint >= 8.0
22

3-
namespace Bug4885;
3+
namespace Bug4885Types;
44

55
use function PHPStan\Testing\assertType;
66

tests/PHPStan/Analyser/data/bug-4902-php8.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php // lint >= 7.4
22

3-
namespace Bug4902;
3+
namespace Bug4902Php8;
44

55
use function PHPStan\Testing\assertType;
66

@@ -44,10 +44,10 @@ function wrap($value): Wrapper
4444
* @param Wrapper<T-all> ...$wrappers
4545
*/
4646
function unwrapAllAndWrapAgain(Wrapper ...$wrappers): void {
47-
assertType('array<int|string, T-all (method Bug4902\Wrapper::unwrapAllAndWrapAgain(), argument)>', array_map(function (Wrapper $item) {
47+
assertType('array<int|string, T-all (method Bug4902Php8\Wrapper::unwrapAllAndWrapAgain(), argument)>', array_map(function (Wrapper $item) {
4848
return $this->unwrap($item);
4949
}, $wrappers));
50-
assertType('array<int|string, T-all (method Bug4902\Wrapper::unwrapAllAndWrapAgain(), argument)>', array_map(fn (Wrapper $item) => $this->unwrap($item), $wrappers));
50+
assertType('array<int|string, T-all (method Bug4902Php8\Wrapper::unwrapAllAndWrapAgain(), argument)>', array_map(fn (Wrapper $item) => $this->unwrap($item), $wrappers));
5151
}
5252

5353
}

tests/PHPStan/Analyser/data/bug-5287-php81.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php declare(strict_types=1);
22

3-
namespace Bug5287;
3+
namespace Bug5287Php81;
44

55
use function PHPStan\Testing\assertType;
66

@@ -34,7 +34,7 @@ function foo3(array $arr): void
3434
/**
3535
* @param non-empty-array<string, int> $arr
3636
*/
37-
function foo3(array $arr): void
37+
function foo4(array $arr): void
3838
{
3939
$arrSpread = [...$arr];
4040
assertType('non-empty-array<string, int>', $arrSpread);
@@ -43,7 +43,7 @@ function foo3(array $arr): void
4343
/**
4444
* @param non-empty-array<mixed, bool|int> $arr
4545
*/
46-
function foo4(array $arr): void
46+
function foo5(array $arr): void
4747
{
4848
$arrSpread = [...$arr];
4949
assertType('non-empty-array<int|string, bool|int>', $arrSpread);

tests/PHPStan/Analyser/data/bug-5287.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function foo3(array $arr): void
3434
/**
3535
* @param non-empty-array<string, int> $arr
3636
*/
37-
function foo3(array $arr): void
37+
function foo4(array $arr): void
3838
{
3939
$arrSpread = [...$arr];
4040
assertType('non-empty-list<int>', $arrSpread);
@@ -43,7 +43,7 @@ function foo3(array $arr): void
4343
/**
4444
* @param non-empty-array<mixed, bool|int> $arr
4545
*/
46-
function foo4(array $arr): void
46+
function foo5(array $arr): void
4747
{
4848
$arrSpread = [...$arr];
4949
assertType('non-empty-list<bool|int>', $arrSpread);

0 commit comments

Comments
 (0)