-
Notifications
You must be signed in to change notification settings - Fork 52
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
Factor directory iterator as a trait #54
Conversation
… on it. and make extension generic so that test (<extension> === 'php') can be overriden if needed.
That would need the same change for the JS extractor to make things DRY. |
src/IterableCodeExtractor.php
Outdated
private static $dir = ''; | ||
|
||
/** | ||
* {@inheritdoc} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use the docs from the ExtractorInterface
here as there's nothing to inherit from otherwise.
Plus, we could describe the possible options a bit better. Perhaps the way WordPress core does it: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#1-1-parameters-that-are-arrays
src/IterableCodeExtractor.php
Outdated
* | ||
* @param string $dir Root path to start the recursive traversal in. | ||
* @param Translations $translations The translations instance to append the new translations. | ||
* @param array $options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted above, we could describe the possible options a bit better. Perhaps the way WordPress core does it: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#1-1-parameters-that-are-arrays
Thanks for the pull-request, @drzraf ! |
Factor directory iterator as a trait
Factor directory iterator as a trait so that other extractor can rely on it and make extension generic so that test (
<extension>
=== 'php') can be overridden if needed.