1.2.1133. Solve Trait Methods

This command adds DEFINITION link between trait’s method definitions and their usage in classes.

<?php

trait t {
    function foo() {

    }
}

class x {
    use t { t::foo as foo2; };

    function bar() {
        // Link to foo() in trait t
        $this->foo();
        // Link to foo() in trait t, thanks to 'as'
        $this->foo2();
    }
}

?>

1.2.1133.1. Specs

Short name

Complete/SolveTraitMethods

Rulesets

All, Changed Behavior, NoDoc

Exakat since

1.9.2

PHP Version

All

Severity

Time To Fix

Precision

High

Features

trait, method

Available in

Entreprise Edition, Exakat Cloud