-
Notifications
You must be signed in to change notification settings - Fork 11
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
Enable Spryker.Commenting.DocBlockApiAnnotation for project level code #367
Comments
Historically, only facades (and their interfaces) needed and need that specification part. |
I'm aware of that, but anyway thanks for the clarification 👍 I just realized that it actually matches also Interfaces, didn't check the whole regex inside the But the other question is still open:
Would it be possible to remove the prefix in the regex? @@ -171,7 +171,7 @@
*/
protected function isFacade(string $namespace, string $name): bool
{
- if (preg_match('/^Spryker[a-zA-Z]*\\\\Zed\\\\[a-zA-Z]+\\\\Business$/', $namespace) && preg_match('/^(.*?)(Facade|FacadeInterface)$/', $name)) {
+ if (preg_match('/^[a-zA-Z]*\\\\Zed\\\\[a-zA-Z]+\\\\Business$/', $namespace) && preg_match('/^(.*?)(Facade|FacadeInterface)$/', $name)) {
return true;
} |
Well, the sniff was always only designed to make the core code validated. |
We're looking for a sniffer that reports missing Specifications in DocBlocks for the interfaces that need one.
Is there any reason why
Spryker.Commenting.DocBlockApiAnnotation
is currently limited to code only from theSpryker
namespace?I'm also not sure if this block of code can even work as expected. I think we need to remove the
Interface
suffix inside\Spryker\Sniffs\AbstractSniffs\AbstractApiClassDetectionSprykerSniff::sprykerApiClass
, e.g. like so:I can send a PR for that if you like
The text was updated successfully, but these errors were encountered: