Skip to content

Commit 6aa8715

Browse files
committed
1 parent b16a24b commit 6aa8715

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎conf/bleedingEdge.neon‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ parameters:
3434
unusedVariable: true
3535
unusedParameters: true
3636
reuseCollectedDataRuleErrors: true
37-
disallowClassLevelTemplatesInStatic: true
37+
disallowClassLevelTemplatesInStaticMethods: true

‎conf/config.neon‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ parameters:
6666
unusedVariable: false
6767
unusedParameters: false
6868
reuseCollectedDataRuleErrors: false
69-
disallowClassLevelTemplatesInStatic: false
69+
disallowClassLevelTemplatesInStaticMethods: false
7070
fileExtensions:
7171
- php
7272
checkAdvancedIsset: false

‎conf/parametersSchema.neon‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ parametersSchema:
6363
unusedVariable: bool()
6464
unusedParameters: bool()
6565
reuseCollectedDataRuleErrors: bool()
66-
disallowClassLevelTemplatesInStatic: bool()
66+
disallowClassLevelTemplatesInStaticMethods: bool()
6767
])
6868
fileExtensions: listOf(string())
6969
checkAdvancedIsset: bool()

‎conf/services.neon‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ services:
138138
phpParser: @stubParser
139139
resolvedPhpDocBlockCacheCountMax: %cache.resolvedPhpDocBlockCacheCountMax%
140140
nameScopeMapMemoryCacheCountMax: %cache.nameScopeMapMemoryCacheCountMax%
141-
disallowClassLevelTemplatesInStatic: %featureToggles.disallowClassLevelTemplatesInStatic%
141+
disallowClassLevelTemplatesInStaticMethods: %featureToggles.disallowClassLevelTemplatesInStaticMethods%
142142
autowired: false
143143

144144
fileExcluderAnalyse:

‎src/Type/FileTypeMapper.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ public function __construct(
9191
private int $resolvedPhpDocBlockCacheCountMax,
9292
#[AutowiredParameter(ref: '%cache.nameScopeMapMemoryCacheCountMax%')]
9393
int $nameScopeMapMemoryCacheCountMax,
94-
#[AutowiredParameter(ref: '%featureToggles.disallowClassLevelTemplatesInStatic%')]
95-
private bool $disallowClassLevelTemplatesInStatic,
94+
#[AutowiredParameter(ref: '%featureToggles.disallowClassLevelTemplatesInStaticMethods%')]
95+
private bool $disallowClassLevelTemplatesInStaticMethods,
9696
)
9797
{
9898
// 0 kept one entry here rather than meaning "no limit" as it does for the other bounded
@@ -392,7 +392,7 @@ private function getNameScopeMap(string $fileName): array
392392
$cacheKey = sprintf(
393393
'ftm-%s%s%s',
394394
$this->returnsSimplifiedAst($fileName) ? 'simplified-' : '',
395-
$this->disallowClassLevelTemplatesInStatic ? 'static-own-scope-' : '',
395+
$this->disallowClassLevelTemplatesInStaticMethods ? 'static-own-scope-' : '',
396396
$fileName,
397397
);
398398
// v6: v5 entries may be poisoned by the turbo comment-loss bug
@@ -564,7 +564,7 @@ function (Node $node) use ($fileName, $lookForTrait, &$traitFound, $traitMethodA
564564

565565
// static methods exist in their own scope
566566
if (
567-
$this->disallowClassLevelTemplatesInStatic
567+
$this->disallowClassLevelTemplatesInStaticMethods
568568
&& $node instanceof Node\Stmt\ClassMethod
569569
&& $node->isStatic()
570570
) {

0 commit comments

Comments
 (0)