Replies: 4 comments 1 reply
-
No, the sniff has no settings for this. A new sniff would need to be written for this, but the use case is so specific that I don't think it would make it back into the core. |
Beta Was this translation helpful? Give feedback.
-
Thanx for your prompt answer.. Yes, you are right it's quite specific. I just had a slight hope, that there are some settings that I haven't found yet.. :-) I'll try then to extend an existing |
Beta Was this translation helpful? Give feedback.
-
Hi again, I've created a Sniff. The Sniff is placed together with my customized ruleset outside the PHP_CodeSniffer repository. I also have a class property in my sniff, which I would like to customize in the ruleset.
My problem ist that the expression value in the ruleset is not passed to the class property. Could you give me a tip how it should be configured, so it would be passed to the class? |
Beta Was this translation helpful? Give feedback.
-
Oh, I've found it !
But I used the wrong namespace in my I've changed it to: And it works :-) Thanx a lot for Your HELP! |
Beta Was this translation helpful? Give feedback.
-
Hi,
Thank you for PHP_CodeSniffer tool! It is very helpful and flexible!
I'd like to create a special check for docblocks of all controller actions.
I wonder if something like this already exists:
Let's say I have an action declaration like 'public function indexAction()'.
So its regex identifier would be '[a-z0-9]Action' in this case.
Then I want to find out, if a line 'request paramerter' exists in the action PhpDocs (docblocks).
If not, a warning/error should be reported.
So a valid action would look like this:
e.g:
Are there any way to solve this task by customising Squiz.Commenting.FunctionComment (or any other) rule
( without extending/overwriting the original class code )?
I mean something like this:
Please, schare your ideas and especially solutions if you've already faced such kind of problem.
Beta Was this translation helpful? Give feedback.
All reactions