mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Check that non-user-defined abstract methods are implemented, too
This commit is contained in:
parent
bc23f732a4
commit
200ea70334
@ -235,6 +235,8 @@ class Reflection
|
||||
$declaring_class = $method->getDeclaringClass();
|
||||
|
||||
$storage->is_static = $method->isStatic();
|
||||
$storage->abstract = $method->isAbstract();
|
||||
|
||||
$class_storage->declaring_method_ids[$method_name] =
|
||||
$declaring_class->name . '::' . strtolower((string)$method->getName());
|
||||
|
||||
|
@ -447,11 +447,20 @@ class ClassTest extends TestCase
|
||||
],
|
||||
'abstractClassMethod' => [
|
||||
'<?php
|
||||
abstract class A {
|
||||
abstract public function foo();
|
||||
}
|
||||
abstract class A {
|
||||
abstract public function foo();
|
||||
}
|
||||
|
||||
class B extends A { }',
|
||||
class B extends A { }',
|
||||
'error_message' => 'UnimplementedAbstractMethod',
|
||||
],
|
||||
'abstractReflectedClassMethod' => [
|
||||
'<?php
|
||||
class DedupeIterator extends FilterIterator {
|
||||
public function __construct(Iterator $i) {
|
||||
parent::__construct($i);
|
||||
}
|
||||
}',
|
||||
'error_message' => 'UnimplementedAbstractMethod',
|
||||
],
|
||||
'missingParent' => [
|
||||
|
Loading…
Reference in New Issue
Block a user