Skip to content

Commit ebd0f63

Browse files
More
1 parent 23963be commit ebd0f63

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Rules/Methods/CallPrivateMethodThroughStaticRule.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ public function processNode(Node $node, Scope $scope): array
5757
'Unsafe call to private method %s::%s() through static::.',
5858
$method->getDeclaringClass()->getDisplayName(),
5959
$method->getName(),
60-
))->identifier('staticClassAccess.privateMethod')->build(),
60+
))
61+
->line($node->name->getStartLine())
62+
->identifier('staticClassAccess.privateMethod')
63+
->build(),
6164
];
6265
}
6366

src/Rules/Properties/AccessPrivatePropertyThroughStaticRule.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ public function processNode(Node $node, Scope $scope): array
5656
'Unsafe access to private property %s::$%s through static::.',
5757
$property->getDeclaringClass()->getDisplayName(),
5858
$propertyName,
59-
))->identifier('staticClassAccess.privateProperty')->build(),
59+
))
60+
->line($node->name->getStartLine())
61+
->identifier('staticClassAccess.privateProperty')
62+
->build(),
6063
];
6164
}
6265

0 commit comments

Comments
 (0)