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

Add getDocBlocks() in RouteDocBlocker #272

Merged

Conversation

ajcastro
Copy link
Contributor

@ajcastro ajcastro commented Jul 9, 2021

This PR adds a method getDocBlocks(Route $route, $className, $methodName = null) in RouteDocBlocker.
The reason behind this so that we can pass a different className and methodName. In my plugin, scribe-tdd, The docblocks annotations are used in the test classes and methods.

Therefore, I plan to create a strategy with implementation to use this like so:

RouteDocBlocker::getDocBlocks($route, 'Tests\Features\Http\UserControllerTest', 'test_users_index');

This will parse the docblocks in the test class and its method.

You can check a fork of the TheSideProjectAPI where I move the docblock annotations to the test classes:
ajcastro/TheSideProjectAPI#1

@shalvah shalvah merged commit 30bd280 into knuckleswtf:master Jul 9, 2021
@ajcastro
Copy link
Contributor Author

ajcastro commented Jul 9, 2021

@ajcastro ajcastro deleted the small-refactor-route-docblocker branch July 9, 2021 15:15
@ajcastro ajcastro restored the small-refactor-route-docblocker branch July 9, 2021 15:15
@ajcastro ajcastro deleted the small-refactor-route-docblocker branch July 9, 2021 15:15
@ajcastro ajcastro restored the small-refactor-route-docblocker branch July 9, 2021 15:16
@ajcastro ajcastro deleted the small-refactor-route-docblocker branch July 9, 2021 15:16
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

Successfully merging this pull request may close these issues.

2 participants