Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully qualified interface name changed to relative name #51

Closed
ben-rowan opened this issue Mar 1, 2018 · 1 comment
Closed

Fully qualified interface name changed to relative name #51

ben-rowan opened this issue Mar 1, 2018 · 1 comment

Comments

@ben-rowan
Copy link

The following code leads to the fully qualified interface name used in the class being converted into a relative name.

// TestClass.php -----------------------------------------
<?php

namespace Test;

class TestClass implements \Test\TestInterface
{

}

// TestInterface.php -----------------------------------------
<?php

namespace Test;

interface TestInterface
{

}

// Run.php -----------------------------------------
<?php

require_once '../vendor/autoload.php';

use gossi\codegen\generator\CodeGenerator;
use gossi\codegen\model\PhpClass;

$class = PhpClass::fromFile('TestClass.php');

$generator = new CodeGenerator();
$code = $generator->generate($class);

echo $code;

// Output -----------------------------------------
namespace Test;

/**
 */
class TestClass implements Test\TestInterface {
}

If you need any further info please let me know.

Cheers

@gossi gossi closed this as completed in 5a561df Aug 4, 2018
@gossi
Copy link
Collaborator

gossi commented Aug 4, 2018

thanks, got this fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants