Downloadsteps
replace "ClassGenerator" with "InterfaceGenerator"
As seen in the interface example between version 1.0.1 and version 1.1.0, you have to replace the usage the "ClassGenerator" with the "InterfaceGenerator".
Simple search for "markAsInterface" to spot the fitting places.
remove call of "markAsInterface"
The method call "markAsInterface" is not needed and available anymore since, remove it.
replace "addImplements" with "addExtends"
Using "implements" in an interface is not working (yes, this was a bug).
Since an interface can have multiple extends, you have to change this call (second argument still is optional).
example
code in version 1.0.1
$interface->setDocumentation($documentationFactory->create());
$interface->setName('FooInterface');
$interface->setNamespace('My\\Example');
$interface->markAsInterface();
$interface->addImplements('BarInterface', true);
$method->setDocumentation($documentationFactory->create());
$method->setName('foo');
$method->markAsHasNoBody();
$method->markAsPublic();
$method->getDocumentation()
->setReturn('string');
code in version 1.1.0
$interface->setDocumentation($documentationFactory->create());
$interface->setName('FooInterface');
$interface->setNamespace('My\\Example');
$interface->addExtends('BarInterface', true);
$method->setDocumentation($documentationFactory->create());
$method->setName('foo');
$method->markAsHasNoBody();
$method->markAsPublic();
$method->getDocumentation()
->setReturn('string');
|