1.2.1080. Set Class Remote Definition With Return Typehint

Links method call to its definition, thanks to the typed return. The link is DEFINITION.

<?php

class x {
    public function bar() {    }
}

function foo() {
    $a = bar();
    // This links to class x, method bar(), thanks to the new.
    return $a->bar();
}

function bar() : x {
    return new x;
}

?>

1.2.1080.1. Specs

Short name

Complete/SetClassRemoteDefinitionWithReturnTypehint

Rulesets

All, Changed Behavior, NoDoc

Exakat since

1.9.3

PHP Version

All

Severity

Time To Fix

Precision

Very high

Available in

Entreprise Edition, Exakat Cloud