grom358 / pharborist

A PHP library to query and transform source code via tree operations.
GNU General Public License v3.0
44 stars 10 forks source link

Add methods to UseDeclarationStatementNode to determine if it imports a class, function, or constant (PHP 5.6) #133

Closed phenaproxima closed 10 years ago

phenaproxima commented 10 years ago

I propose something like this:

// These all return boolean
$use->importsClass();
$use->importsClass('\My\Awesome\Class');
$use->importsFunction();
$use->importsFunction('\pants_change');
$use->importsConstant();
$use->importsConstant('\MyNS\FOOBAR');
grom358 commented 10 years ago

Merged.