File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
src/Psalm/Internal/Analyzer Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -1752,7 +1752,7 @@ private function analyzeClassMethod(
17521752 $ declaring_method_storage ,
17531753 $ this ->fq_class_name ,
17541754 $ implementer_method_storage ->visibility ,
1755- new CodeLocation ($ source , $ stmt ),
1755+ $ implementer_method_storage -> stmt_location ?? new CodeLocation ($ source , $ stmt ),
17561756 $ implementer_method_storage ->suppressed_issues ,
17571757 false ,
17581758 );
Original file line number Diff line number Diff line change @@ -1152,6 +1152,22 @@ public function fooFoo(string $a): void {
11521152 } ' ,
11531153 'error_message ' => 'MethodSignatureMismatch ' ,
11541154 ],
1155+ 'dontReportImplementerErrorOnAbstractTraitMethodTwice ' => [
1156+ 'code ' => '<?php
1157+ trait B {
1158+ abstract public function run();
1159+ }
1160+
1161+ final class A {
1162+ use B;
1163+
1164+ #[Override]
1165+ public function run(string $foo): string {
1166+ return $foo;
1167+ }
1168+ } ' ,
1169+ 'error_message ' => 'MethodSignatureMismatch - src ' . DIRECTORY_SEPARATOR . 'somefile.php:9: ' ,
1170+ ],
11551171 'missingTraitPropertyType ' => [
11561172 'code ' => '<?php
11571173 trait T {
You can’t perform that action at this time.
0 commit comments