-
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Description
information is based on http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.class.class.
since php5.5 there is a keyword to gather a classes name: MyClass::class;
unfortunately this causes issues with the class gathering, so the current implementation has a bug.
example code:
<?php
namespace MyName\Space;
class MyClass
{
public function __construct()
{
$ret = \Bar::class;
$set = \Foo::class;
$get = \Bar\FooBar::class;
$let = self::class;
}
}
echo MyClass::class;having this example code parsed and then using \Cz\PhpDepend::getClasses()
returns: ['MyName\Space\MyClass', 'MyName\Space', 'MyName\Space', 'MyName\Space', 'MyName\Space']
expected: ['MyName\Space\MyClass'] ❌
having this example code parsed and then using \Cz\PhpDepend::getDependencies()
returns: ['Bar', 'Foo', 'Bar\FooBar', 'MyName\Space\MyClass']
expected: same as it is returned ✅
Reactions are currently unavailable