Skip to content

Commit e4acdfa

Browse files
Update non-static access rule naming and message
Co-authored-by: Ondřej Mirtes <[email protected]>
1 parent d3d8c79 commit e4acdfa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Rules/Properties/AccessPropertiesCheck.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ private function processSingleProperty(Scope $scope, PropertyFetch $node, string
163163
if ($propertyReflection->isStatic()) {
164164
return [
165165
RuleErrorBuilder::message(sprintf(
166-
'Non static access to static property %s::$%s.',
166+
'Non-static access to static property %s::$%s.',
167167
$propertyReflection->getDeclaringClass()->getDisplayName(),
168168
$name,
169-
))->identifier('property.nonStaticAccess')->build(),
169+
))->identifier('staticProperty.nonStaticAccess')->build(),
170170
];
171171
}
172172

tests/PHPStan/Rules/Properties/AccessPropertiesRuleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ public function testBug12692(): void
350350
$this->checkUnionTypes = false;
351351
$this->checkDynamicProperties = false;
352352
$this->analyse([__DIR__ . '/data/bug-12692.php'], [[
353-
'Non static access to static property Bug12692\Foo::$static.',
353+
'Non-static access to static property Bug12692\Foo::$static.',
354354
14,
355355
]]);
356356
}

0 commit comments

Comments
 (0)