1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
psalm/docs/running_psalm/issues/ConstructorSignatureMismatch.md

18 lines
435 B
Markdown
Raw Normal View History

# ConstructorSignatureMismatch
Emitted when a constructor parameter differs from a parent constructor parameter, or if there are fewer parameters than the parent constructor AND where the parent class has a `@psalm-consistent-constructor` annotation.
```php
<?php
/**
* @psalm-consistent-constructor
*/
class A {
public function __construct(int $i) {}
}
class B extends A {
public function __construct(string $s) {}
}
```