Extended interfaces are marked as implemented in ClassType::from
iggyvolz opened this issue · comments
iggyvolz commented
Version: 3.5.4 (also reproduced on master)
Bug Description
When performing a ClassType::from on an interface which extends another interface, the relation is marked as an implements relationship rather than an extends relationship.
Steps To Reproduce
<?php
require_once __DIR__ . "/vendor/autoload.php";
interface a{}
interface b extends a{}
echo \Nette\PhpGenerator\ClassType::from(b::class);
Gives:
interface b implements a
{
}
Expected Behavior
interface b extends a
{
}
Possible Solution
The check here
may need to split based on whether the class is an interface or not - from my understanding interfaces can only extend other interfaces.David Grudl commented
fixed