You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
abstract class Parent {
public function a(string $a) { }
}
final class Child extends Parent {
- public function a($a) { }+ public function a(string $a) { }
}
abstract class Parent {
- public function a($a) { }+ public function a($a, $b = null) { }
}
final class Child extends Parent {
public function a($a) { }
public function a($a, $b = null) { }
}
(i am not sure if situation 2 would work without optional parameter - default value)
The text was updated successfully, but these errors were encountered:
JanMikes
changed the title
[Idea] Child method compatible with parent (missing typehint or
[Idea] Child method compatible with parent (missing typehint or argument)
May 1, 2019
Situation 1:
Related to PHP 7.1 only: https://3v4l.org/Ev0XJ
Situation 2
(i am not sure if situation 2 would work without optional parameter - default value)
Related to PHP 7.1+ - see https://3v4l.org/8K3sp
The text was updated successfully, but these errors were encountered: