Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 234 Bytes

LessSpecificReturnStatement.md

File metadata and controls

14 lines (10 loc) · 234 Bytes

LessSpecificReturnStatement

Emitted when a return statement is more general than the return type given for the function

<?php

class A {}
class B extends A {}

function foo() : B {
    return new A(); // emitted here
}