mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Issues with non-abstract methods should always be MethodSignatureMismatches
This commit is contained in:
parent
a5434aabfe
commit
e475a1826c
@ -593,7 +593,10 @@ class MethodAnalyzer extends FunctionLikeAnalyzer
|
||||
: TypeAnalyzer::isContainedByInPhp($implementer_signature_return_type, $guide_signature_return_type);
|
||||
|
||||
if (!$is_contained_by) {
|
||||
if ($guide_classlike_storage->is_trait === $implementer_classlike_storage->is_trait) {
|
||||
if ($guide_classlike_storage->is_trait === $implementer_classlike_storage->is_trait
|
||||
|| (!$implementer_method_storage->abstract
|
||||
&& !$guide_classlike_storage->abstract)
|
||||
) {
|
||||
if (IssueBuffer::accepts(
|
||||
new MethodSignatureMismatch(
|
||||
'Method ' . $cased_implementer_method_id . ' with return type \''
|
||||
@ -948,7 +951,10 @@ class MethodAnalyzer extends FunctionLikeAnalyzer
|
||||
$implementer_param_signature_type
|
||||
);
|
||||
if (!$is_contained_by) {
|
||||
if ($guide_classlike_storage->is_trait === $implementer_classlike_storage->is_trait) {
|
||||
if ($guide_classlike_storage->is_trait === $implementer_classlike_storage->is_trait
|
||||
|| (!$implementer_method_storage->abstract
|
||||
&& !$guide_classlike_storage->abstract)
|
||||
) {
|
||||
if (IssueBuffer::accepts(
|
||||
new MethodSignatureMismatch(
|
||||
'Argument ' . ($i + 1) . ' of ' . $cased_implementer_method_id . ' has wrong type \'' .
|
||||
|
Loading…
x
Reference in New Issue
Block a user