Inheriting metadata from parent structures

suggest change

@inheritDoc copies the parent method's documentation into the child. Change the base documentation once and every child that inherits it picks up that change.

abstract class FooBase
{
    /**
     * @param int $a First parameter to add
     * @param int $b Second parameter to add
     * @return int
     */
    public function sum($a, $b) {}
}

class ConcreteFoo extends FooBase
{
    /**
     * @inheritDoc
     */
    public function sum($a, $b)
    {
        return $a + $b;
    }
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents