Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 38 lines (30 sloc) 1.07 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
<?php

// For "Insert Call to Parent"

// Typing "parent" and pressing tab on the following line should result in no special action

class FooBar
{
    public function test($foo, $bar = 123, array $arr = array(1, 2), Something_Else $blah = null)
    {
        // Typing "parent" and then pressing tab should result in:
        // parent::test($foo, $bar, $arr, $blah);
    }

    public function &test2($foo2, $bar = 123, array $arr = array(1, 2), Something_Else $blah = null)
    {
        // This closure should not fool the code
        $x = function () { return 'foo'; };
        
        // parent::test2($foo2, $bar, $arr, $blah);
    }

    public function &test3($foo3,
        $bar = 123,
        array $arr = array(1, 2),
        Something_Else $blah = null
    ) {
        // parent::test3($foo3, $bar, $arr, $blah);
    }

    public function test4()
    {
        // parent::test4();
    }
}

// Typing "parent" and pressing tab here will generate a parent call for test4(), which is a known
// issue and limitation of the current implementation
Something went wrong with that request. Please try again.