-
Notifications
You must be signed in to change notification settings - Fork 79
Unindentified index 1 #82
Comments
zendframework-zend-code-001.txt oops, still getting used to php7 :P |
Requires a failing test case |
Sorry. I'm new to the 'official' bug reporting. How does such a failing test case look like? Do I make a unit test that fails? Do I suply an exsisting unit test with my function so that that test fails? |
This is the code wich caused the bug; because all the functions are 1-liners the explode on \n will fail to produce an array with more than one result I hope this will help :D |
@chris-kruining could you try sending a patch for the |
like this? in my testcase it should fail with the current code in de methodgenerator. |
Test checked in |
@Saeven thanks! Closing this one as duplicate. |
src/Generator/MethodGenerator.php -> clearBodyIndention (lines 90 to 109)
is trying to parse the following body:
array (size=1)
0 => string ' return $this->getServiceLocator()->get('Core\Page\Service\PageService');' (length=86)
(this is a vardump of the result from the explode on line 96)
this method asumes that all my functions have an enter at the first line, I'd suggest to make this method a tad bit smarter so that it is able to work when you have a oneliner, like I have in my case.
zendframework-zend-code-001.txt
The text was updated successfully, but these errors were encountered: