1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Fix #998 - use lowercase comparison for method signature checks

This commit is contained in:
Matthew Brown 2018-09-19 23:12:35 -04:00
parent 3187b5723d
commit 350afe3e7f
2 changed files with 32 additions and 2 deletions

View File

@ -633,10 +633,11 @@ class MethodChecker extends FunctionLikeChecker
&& (
!$implemeneter_param_type
|| (
$implemeneter_param_type->getId() !== $guide_param->type->getId()
strtolower($implemeneter_param_type->getId()) !== strtolower($guide_param->type->getId())
&& (
!$or_null_guide_type
|| $implemeneter_param_type->getId() !== $or_null_guide_type->getId()
|| strtolower($implemeneter_param_type->getId())
!== strtolower($or_null_guide_type->getId())
)
)
)

View File

@ -288,6 +288,35 @@ class MethodSignatureTest extends TestCase
use T;
}',
],
'inheritsSplClasses' => [
'<?php
namespace App;
use SplObserver;
use SplSubject;
class Observer implements \SplObserver
{
public function update(SplSubject $subject)
{
}
}
class Subject implements \SplSubject
{
public function attach(SplObserver $observer)
{
}
public function detach(SplObserver $observer)
{
}
public function notify()
{
}
}',
],
];
}