Skip to content

Commit 8401926

Browse files
committed
Make canonical names non-lowercased
1 parent 2a04ff6 commit 8401926

10 files changed

Lines changed: 178 additions & 19 deletions

libs/phpdoc/src/Parser/TagRegistry.php

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
*
2626
* @phpstan-import-type CombinatorType from CombinatorInterface
2727
*
28-
* @template-implements \IteratorAggregate<non-empty-string, TagDefinitionInterface>
28+
* @template-implements \IteratorAggregate<non-empty-lowercase-string, TagDefinitionInterface>
2929
*/
3030
final readonly class TagRegistry implements TagRegistryInterface, \IteratorAggregate
3131
{
3232
/**
33-
* @var array<non-empty-string, TagDefinitionInterface>
33+
* @var array<non-empty-lowercase-string, TagDefinitionInterface>
3434
*/
3535
private array $definitions;
3636

@@ -40,16 +40,48 @@
4040
private array $aliases;
4141

4242
/**
43-
* @param iterable<non-empty-lowercase-string, TagDefinitionInterface> $definitions
44-
* @param iterable<non-empty-lowercase-string, non-empty-lowercase-string> $aliases
43+
* @param iterable<non-empty-string, TagDefinitionInterface> $definitions
44+
* @param iterable<non-empty-string, non-empty-string> $aliases
4545
*/
4646
public function __construct(
4747
iterable $definitions = [],
4848
iterable $aliases = [],
4949
private TagDefinitionInterface $genericTagDefinition = new GenericTagDefinition(),
5050
) {
51-
$this->definitions = \iterator_to_array($definitions);
52-
$this->aliases = \iterator_to_array($aliases);
51+
$this->definitions = $this->formatDefinitions($definitions);
52+
$this->aliases = $this->formatAliases($aliases);
53+
}
54+
55+
/**
56+
* @param iterable<non-empty-string, TagDefinitionInterface> $definitions
57+
* @return array<non-empty-lowercase-string, TagDefinitionInterface>
58+
*/
59+
private function formatDefinitions(iterable $definitions): array
60+
{
61+
$result = [];
62+
63+
foreach ($definitions as $name => $definition) {
64+
$result[\strtolower($name)] = $definition;
65+
}
66+
67+
\ksort($result);
68+
69+
return $result;
70+
}
71+
72+
/**
73+
* @param iterable<non-empty-string, non-empty-string> $aliases
74+
* @return array<non-empty-lowercase-string, non-empty-lowercase-string>
75+
*/
76+
private function formatAliases(iterable $aliases): array
77+
{
78+
$result = [];
79+
80+
foreach ($aliases as $alias => $name) {
81+
$result[\strtolower($alias)] = \strtolower($name);
82+
}
83+
84+
return $result;
5385
}
5486

5587
public function get(string $name): TagDefinitionInterface
@@ -65,7 +97,7 @@ public function get(string $name): TagDefinitionInterface
6597

6698
public function getIterator(): \Traversable
6799
{
68-
/** @var \ArrayIterator<non-empty-string, TagDefinitionInterface> */
100+
/** @var \ArrayIterator<non-empty-lowercase-string, TagDefinitionInterface> */
69101
return new \ArrayIterator($this->definitions);
70102
}
71103

libs/phpdoc/src/Platform/PhanPlatform.php

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,29 @@
1111
use TypeLang\PhpDoc\DocBlock\Tag\MixinTag\MixinTagDefinition;
1212
use TypeLang\PhpDoc\DocBlock\Tag\OverrideTag\OverrideTagDefinition;
1313
use TypeLang\PhpDoc\DocBlock\Tag\ParamTag\ParamTagDefinition;
14+
use TypeLang\PhpDoc\DocBlock\Tag\PhanConstructorUsedForSideEffectsTag\PhanConstructorUsedForSideEffectsTagDefinition;
15+
use TypeLang\PhpDoc\DocBlock\Tag\PhanForbidUndeclaredMagicMethodsTag\PhanForbidUndeclaredMagicMethodsTagDefinition;
16+
use TypeLang\PhpDoc\DocBlock\Tag\PhanForbidUndeclaredMagicPropertiesTag\PhanForbidUndeclaredMagicPropertiesTagDefinition;
17+
use TypeLang\PhpDoc\DocBlock\Tag\PhanOutputReferenceTag\PhanOutputReferenceTagDefinition;
18+
use TypeLang\PhpDoc\DocBlock\Tag\PhanSideEffectFreeTag\PhanSideEffectFreeTagDefinition;
19+
use TypeLang\PhpDoc\DocBlock\Tag\PhanTransientTag\PhanTransientTagDefinition;
20+
use TypeLang\PhpDoc\DocBlock\Tag\PhanWriteOnlyTag\PhanWriteOnlyTagDefinition;
1421
use TypeLang\PhpDoc\DocBlock\Tag\PropertyTag\PropertyReadTagDefinition;
1522
use TypeLang\PhpDoc\DocBlock\Tag\PropertyTag\PropertyTagDefinition;
1623
use TypeLang\PhpDoc\DocBlock\Tag\PropertyTag\PropertyWriteTagDefinition;
24+
use TypeLang\PhpDoc\DocBlock\Tag\PureTag\PureTagDefinition;
1725
use TypeLang\PhpDoc\DocBlock\Tag\ReadonlyTag\ReadonlyTagDefinition;
1826
use TypeLang\PhpDoc\DocBlock\Tag\ReturnTag\ReturnTagDefinition;
1927
use TypeLang\PhpDoc\DocBlock\Tag\TemplateTag\TemplateTagDefinition;
2028
use TypeLang\PhpDoc\DocBlock\Tag\UnusedParamTag\UnusedParamTagDefinition;
2129
use TypeLang\PhpDoc\DocBlock\Tag\VarTag\VarTagDefinition;
30+
use TypeLang\PhpDoc\DocBlock\TagDefinition\TagDefinitionInterface;
2231

2332
/**
2433
* The Phan platform: the "@phan-*" tag family understood by Phan.
2534
*
26-
* Only those tags that restate an existing tag are wired up, as aliases onto it;
27-
* Phan's own analysis-specific tags carry no meaning here.
35+
* Tags that restate an existing one are wired as aliases onto it; Phan's own
36+
* marker tags are contributed as their own flag definitions.
2837
*/
2938
final class PhanPlatform extends Platform
3039
{
@@ -35,6 +44,22 @@ final class PhanPlatform extends Platform
3544

3645
public private(set) string $name = self::NAME;
3746

47+
/**
48+
* @var iterable<non-empty-lowercase-string, TagDefinitionInterface>
49+
*/
50+
public iterable $tags {
51+
get => [
52+
'phan-pure' => new PureTagDefinition(),
53+
PhanConstructorUsedForSideEffectsTagDefinition::NAME => new PhanConstructorUsedForSideEffectsTagDefinition(),
54+
PhanForbidUndeclaredMagicMethodsTagDefinition::NAME => new PhanForbidUndeclaredMagicMethodsTagDefinition(),
55+
PhanForbidUndeclaredMagicPropertiesTagDefinition::NAME => new PhanForbidUndeclaredMagicPropertiesTagDefinition(),
56+
PhanSideEffectFreeTagDefinition::NAME => new PhanSideEffectFreeTagDefinition(),
57+
PhanTransientTagDefinition::NAME => new PhanTransientTagDefinition(),
58+
PhanWriteOnlyTagDefinition::NAME => new PhanWriteOnlyTagDefinition(),
59+
PhanOutputReferenceTagDefinition::NAME => new PhanOutputReferenceTagDefinition(),
60+
];
61+
}
62+
3863
/**
3964
* @var iterable<non-empty-lowercase-string, non-empty-lowercase-string>
4065
*/

libs/phpdoc/src/Platform/PhpCodeSnifferPlatform.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
namespace TypeLang\PhpDoc\Platform;
66

7+
use TypeLang\PhpDoc\DocBlock\Tag\CodingStandardsIgnoreEndTag\CodingStandardsIgnoreEndTagDefinition;
8+
use TypeLang\PhpDoc\DocBlock\Tag\CodingStandardsIgnoreFileTag\CodingStandardsIgnoreFileTagDefinition;
9+
use TypeLang\PhpDoc\DocBlock\Tag\CodingStandardsIgnoreLineTag\CodingStandardsIgnoreLineTagDefinition;
10+
use TypeLang\PhpDoc\DocBlock\Tag\CodingStandardsIgnoreStartTag\CodingStandardsIgnoreStartTagDefinition;
11+
use TypeLang\PhpDoc\DocBlock\TagDefinition\TagDefinitionInterface;
12+
713
/**
814
* The PHP CodeSniffer platform: the "@phpcs:*" tag family understood by PHP
915
* CodeSniffer.
@@ -16,4 +22,16 @@ final class PhpCodeSnifferPlatform extends Platform
1622
public const string NAME = 'PHP CodeSniffer';
1723

1824
public private(set) string $name = self::NAME;
25+
26+
/**
27+
* @var iterable<non-empty-string, TagDefinitionInterface>
28+
*/
29+
public iterable $tags {
30+
get => [
31+
CodingStandardsIgnoreStartTagDefinition::NAME => new CodingStandardsIgnoreStartTagDefinition(),
32+
CodingStandardsIgnoreEndTagDefinition::NAME => new CodingStandardsIgnoreEndTagDefinition(),
33+
CodingStandardsIgnoreLineTagDefinition::NAME => new CodingStandardsIgnoreLineTagDefinition(),
34+
CodingStandardsIgnoreFileTagDefinition::NAME => new CodingStandardsIgnoreFileTagDefinition(),
35+
];
36+
}
1937
}

libs/phpdoc/src/Platform/PhpDocumentorPlatform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ final class PhpDocumentorPlatform extends Platform
5050
public private(set) string $name = self::NAME;
5151

5252
/**
53-
* @var iterable<non-empty-lowercase-string, TagDefinitionInterface>
53+
* @var iterable<non-empty-string, TagDefinitionInterface>
5454
*/
5555
public iterable $tags {
5656
get => [

libs/phpdoc/src/Platform/PhpStanPlatform.php

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
namespace TypeLang\PhpDoc\Platform;
66

7+
use TypeLang\PhpDoc\DocBlock\Tag\AllowPrivateMutationTag\AllowPrivateMutationTagDefinition;
8+
use TypeLang\PhpDoc\DocBlock\Tag\ConsistentConstructorTag\ConsistentConstructorTagDefinition;
79
use TypeLang\PhpDoc\DocBlock\Tag\ImmutableTag\ImmutableTagDefinition;
810
use TypeLang\PhpDoc\DocBlock\Tag\InheritanceTag\ExtendsTagDefinition;
911
use TypeLang\PhpDoc\DocBlock\Tag\InheritanceTag\ImplementsTagDefinition;
@@ -14,10 +16,15 @@
1416
use TypeLang\PhpDoc\DocBlock\Tag\ParamInvokedCallableTag\ParamLaterInvokedCallableTagDefinition;
1517
use TypeLang\PhpDoc\DocBlock\Tag\ParamOutTag\ParamOutTagDefinition;
1618
use TypeLang\PhpDoc\DocBlock\Tag\ParamTag\ParamTagDefinition;
19+
use TypeLang\PhpDoc\DocBlock\Tag\PhpStanIgnoreLineTag\PhpStanIgnoreLineTagDefinition;
20+
use TypeLang\PhpDoc\DocBlock\Tag\PhpStanIgnoreNextLineTag\PhpStanIgnoreNextLineTagDefinition;
21+
use TypeLang\PhpDoc\DocBlock\Tag\PhpStanImpureTag\PhpStanImpureTagDefinition;
1722
use TypeLang\PhpDoc\DocBlock\Tag\PropertyTag\PropertyReadTagDefinition;
1823
use TypeLang\PhpDoc\DocBlock\Tag\PropertyTag\PropertyTagDefinition;
1924
use TypeLang\PhpDoc\DocBlock\Tag\PropertyTag\PropertyWriteTagDefinition;
25+
use TypeLang\PhpDoc\DocBlock\Tag\PureTag\PureTagDefinition;
2026
use TypeLang\PhpDoc\DocBlock\Tag\PureUnlessCallableIsImpureTag\PureUnlessCallableIsImpureTagDefinition;
27+
use TypeLang\PhpDoc\DocBlock\Tag\ReadonlyAllowPrivateMutationTag\ReadonlyAllowPrivateMutationTagDefinition;
2128
use TypeLang\PhpDoc\DocBlock\Tag\ReadonlyTag\ReadonlyTagDefinition;
2229
use TypeLang\PhpDoc\DocBlock\Tag\RequireInheritanceTag\RequireExtendsTagDefinition;
2330
use TypeLang\PhpDoc\DocBlock\Tag\RequireInheritanceTag\RequireImplementsTagDefinition;
@@ -27,12 +34,13 @@
2734
use TypeLang\PhpDoc\DocBlock\Tag\TemplateTag\TemplateTagDefinition;
2835
use TypeLang\PhpDoc\DocBlock\Tag\ThrowsTag\ThrowsTagDefinition;
2936
use TypeLang\PhpDoc\DocBlock\Tag\VarTag\VarTagDefinition;
37+
use TypeLang\PhpDoc\DocBlock\TagDefinition\TagDefinitionInterface;
3038

3139
/**
3240
* The PHPStan platform: the "@phpstan-*" tag family understood by PHPStan.
3341
*
34-
* Only those tags that restate an existing tag are wired up, as aliases onto it;
35-
* PHPStan's own analysis-specific tags carry no meaning here.
42+
* Tags that restate an existing one are wired as aliases onto it; PHPStan's own
43+
* marker tags are contributed as their own flag definitions.
3644
*/
3745
final class PhpStanPlatform extends Platform
3846
{
@@ -43,6 +51,21 @@ final class PhpStanPlatform extends Platform
4351

4452
public private(set) string $name = self::NAME;
4553

54+
/**
55+
* @var iterable<non-empty-lowercase-string, TagDefinitionInterface>
56+
*/
57+
public iterable $tags {
58+
get => [
59+
'phpstan-allow-private-mutation' => new AllowPrivateMutationTagDefinition(),
60+
'phpstan-consistent-constructor' => new ConsistentConstructorTagDefinition(),
61+
'phpstan-pure' => new PureTagDefinition(),
62+
'phpstan-readonly-allow-private-mutation' => new ReadonlyAllowPrivateMutationTagDefinition(),
63+
PhpStanImpureTagDefinition::NAME => new PhpStanImpureTagDefinition(),
64+
PhpStanIgnoreLineTagDefinition::NAME => new PhpStanIgnoreLineTagDefinition(),
65+
PhpStanIgnoreNextLineTagDefinition::NAME => new PhpStanIgnoreNextLineTagDefinition(),
66+
];
67+
}
68+
4669
/**
4770
* @var iterable<non-empty-lowercase-string, non-empty-lowercase-string>
4871
*/

libs/phpdoc/src/Platform/PhpStormPlatform.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
namespace TypeLang\PhpDoc\Platform;
66

7+
use TypeLang\PhpDoc\DocBlock\Tag\FormatterOffTag\FormatterOffTagDefinition;
8+
use TypeLang\PhpDoc\DocBlock\Tag\FormatterOnTag\FormatterOnTagDefinition;
9+
use TypeLang\PhpDoc\DocBlock\TagDefinition\TagDefinitionInterface;
10+
711
/**
812
* The PhpStorm platform: the tag family understood by the PhpStorm IDE.
913
*/
@@ -15,4 +19,14 @@ final class PhpStormPlatform extends Platform
1519
public const string NAME = 'PhpStorm';
1620

1721
public private(set) string $name = self::NAME;
22+
23+
/**
24+
* @var iterable<non-empty-lowercase-string, TagDefinitionInterface>
25+
*/
26+
public iterable $tags {
27+
get => [
28+
FormatterOffTagDefinition::NAME => new FormatterOffTagDefinition(),
29+
FormatterOnTagDefinition::NAME => new FormatterOnTagDefinition(),
30+
];
31+
}
1832
}

libs/phpdoc/src/Platform/Platform.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
abstract class Platform implements PlatformInterface
1414
{
1515
/**
16-
* @var iterable<non-empty-lowercase-string, TagDefinitionInterface>
16+
* @var iterable<non-empty-string, TagDefinitionInterface>
1717
*/
1818
public iterable $tags {
1919
get => [];
2020
}
2121

2222
/**
23-
* @var iterable<non-empty-lowercase-string, non-empty-lowercase-string>
23+
* @var iterable<non-empty-string, non-empty-string>
2424
*/
2525
public iterable $aliases {
2626
get => [];

libs/phpdoc/src/Platform/PlatformInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ interface PlatformInterface
3030
/**
3131
* Tag definitions keyed by their canonical (lower-case) name.
3232
*
33-
* @var iterable<non-empty-lowercase-string, TagDefinitionInterface>
33+
* @var iterable<non-empty-string, TagDefinitionInterface>
3434
*/
3535
public iterable $tags {
3636
get;
@@ -39,7 +39,7 @@ interface PlatformInterface
3939
/**
4040
* Alias-to-canonical name pairs, both lower-case.
4141
*
42-
* @var iterable<non-empty-lowercase-string, non-empty-lowercase-string>
42+
* @var iterable<non-empty-string, non-empty-string>
4343
*/
4444
public iterable $aliases {
4545
get;

libs/phpdoc/src/Platform/PsalmPlatform.php

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
namespace TypeLang\PhpDoc\Platform;
66

7+
use TypeLang\PhpDoc\DocBlock\Tag\AllowPrivateMutationTag\AllowPrivateMutationTagDefinition;
78
use TypeLang\PhpDoc\DocBlock\Tag\ApiTag\ApiTagDefinition;
9+
use TypeLang\PhpDoc\DocBlock\Tag\ConsistentConstructorTag\ConsistentConstructorTagDefinition;
810
use TypeLang\PhpDoc\DocBlock\Tag\ImmutableTag\ImmutableTagDefinition;
911
use TypeLang\PhpDoc\DocBlock\Tag\InheritanceTag\ExtendsTagDefinition;
1012
use TypeLang\PhpDoc\DocBlock\Tag\InheritanceTag\ImplementsTagDefinition;
@@ -16,6 +18,23 @@
1618
use TypeLang\PhpDoc\DocBlock\Tag\PropertyTag\PropertyReadTagDefinition;
1719
use TypeLang\PhpDoc\DocBlock\Tag\PropertyTag\PropertyTagDefinition;
1820
use TypeLang\PhpDoc\DocBlock\Tag\PropertyTag\PropertyWriteTagDefinition;
21+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmConsistentTemplatesTag\PsalmConsistentTemplatesTagDefinition;
22+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmExternalMutationFreeTag\PsalmExternalMutationFreeTagDefinition;
23+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmIgnoreFalsableReturnTag\PsalmIgnoreFalsableReturnTagDefinition;
24+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmIgnoreNullableReturnTag\PsalmIgnoreNullableReturnTagDefinition;
25+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmIgnoreVariableMethodTag\PsalmIgnoreVariableMethodTagDefinition;
26+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmIgnoreVariablePropertyTag\PsalmIgnoreVariablePropertyTagDefinition;
27+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmIgnoreVarTag\PsalmIgnoreVarTagDefinition;
28+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmMutationFreeTag\PsalmMutationFreeTagDefinition;
29+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmNoSealMethodsTag\PsalmNoSealMethodsTagDefinition;
30+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmNoSealPropertiesTag\PsalmNoSealPropertiesTagDefinition;
31+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmOverrideMethodVisibilityTag\PsalmOverrideMethodVisibilityTagDefinition;
32+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmOverridePropertyVisibilityTag\PsalmOverridePropertyVisibilityTagDefinition;
33+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmStubOverrideTag\PsalmStubOverrideTagDefinition;
34+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmTaintSpecializeTag\PsalmTaintSpecializeTagDefinition;
35+
use TypeLang\PhpDoc\DocBlock\Tag\PsalmVariadicTag\PsalmVariadicTagDefinition;
36+
use TypeLang\PhpDoc\DocBlock\Tag\PureTag\PureTagDefinition;
37+
use TypeLang\PhpDoc\DocBlock\Tag\ReadonlyAllowPrivateMutationTag\ReadonlyAllowPrivateMutationTagDefinition;
1938
use TypeLang\PhpDoc\DocBlock\Tag\ReadonlyTag\ReadonlyTagDefinition;
2039
use TypeLang\PhpDoc\DocBlock\Tag\RequireInheritanceTag\RequireExtendsTagDefinition;
2140
use TypeLang\PhpDoc\DocBlock\Tag\RequireInheritanceTag\RequireImplementsTagDefinition;
@@ -27,12 +46,13 @@
2746
use TypeLang\PhpDoc\DocBlock\Tag\TemplateTag\TemplateCovariantTagDefinition;
2847
use TypeLang\PhpDoc\DocBlock\Tag\TemplateTag\TemplateTagDefinition;
2948
use TypeLang\PhpDoc\DocBlock\Tag\VarTag\VarTagDefinition;
49+
use TypeLang\PhpDoc\DocBlock\TagDefinition\TagDefinitionInterface;
3050

3151
/**
3252
* The Psalm platform: the "@psalm-*" tag family understood by Psalm.
3353
*
34-
* Only those tags that restate an existing tag are wired up, as aliases onto it;
35-
* Psalm's own analysis-specific tags carry no meaning here.
54+
* Tags that restate an existing one are wired as aliases onto it; Psalm's own
55+
* marker tags are contributed as their own flag definitions.
3656
*/
3757
final class PsalmPlatform extends Platform
3858
{
@@ -43,6 +63,33 @@ final class PsalmPlatform extends Platform
4363

4464
public private(set) string $name = self::NAME;
4565

66+
/**
67+
* @var iterable<non-empty-lowercase-string, TagDefinitionInterface>
68+
*/
69+
public iterable $tags {
70+
get => [
71+
'psalm-allow-private-mutation' => new AllowPrivateMutationTagDefinition(),
72+
'psalm-consistent-constructor' => new ConsistentConstructorTagDefinition(),
73+
'psalm-pure' => new PureTagDefinition(),
74+
'psalm-readonly-allow-private-mutation' => new ReadonlyAllowPrivateMutationTagDefinition(),
75+
PsalmConsistentTemplatesTagDefinition::NAME => new PsalmConsistentTemplatesTagDefinition(),
76+
PsalmExternalMutationFreeTagDefinition::NAME => new PsalmExternalMutationFreeTagDefinition(),
77+
PsalmMutationFreeTagDefinition::NAME => new PsalmMutationFreeTagDefinition(),
78+
PsalmIgnoreFalsableReturnTagDefinition::NAME => new PsalmIgnoreFalsableReturnTagDefinition(),
79+
PsalmIgnoreNullableReturnTagDefinition::NAME => new PsalmIgnoreNullableReturnTagDefinition(),
80+
PsalmIgnoreVarTagDefinition::NAME => new PsalmIgnoreVarTagDefinition(),
81+
PsalmIgnoreVariableMethodTagDefinition::NAME => new PsalmIgnoreVariableMethodTagDefinition(),
82+
PsalmIgnoreVariablePropertyTagDefinition::NAME => new PsalmIgnoreVariablePropertyTagDefinition(),
83+
PsalmNoSealMethodsTagDefinition::NAME => new PsalmNoSealMethodsTagDefinition(),
84+
PsalmNoSealPropertiesTagDefinition::NAME => new PsalmNoSealPropertiesTagDefinition(),
85+
PsalmOverrideMethodVisibilityTagDefinition::NAME => new PsalmOverrideMethodVisibilityTagDefinition(),
86+
PsalmOverridePropertyVisibilityTagDefinition::NAME => new PsalmOverridePropertyVisibilityTagDefinition(),
87+
PsalmStubOverrideTagDefinition::NAME => new PsalmStubOverrideTagDefinition(),
88+
PsalmTaintSpecializeTagDefinition::NAME => new PsalmTaintSpecializeTagDefinition(),
89+
PsalmVariadicTagDefinition::NAME => new PsalmVariadicTagDefinition(),
90+
];
91+
}
92+
4693
/**
4794
* @var iterable<non-empty-lowercase-string, non-empty-lowercase-string>
4895
*/

libs/phpdoc/src/TagRegistryInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use TypeLang\PhpDoc\DocBlock\TagDefinition\TagDefinitionInterface;
88

99
/**
10-
* @template-extends \Traversable<non-empty-string, TagDefinitionInterface>
10+
* @template-extends \Traversable<non-empty-lowercase-string, TagDefinitionInterface>
1111
*/
1212
interface TagRegistryInterface extends \Traversable, \Countable
1313
{

0 commit comments

Comments
 (0)