Calling Developers!
We are reenergizing our code contribution process! Learn More

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hey guys, I have a question concerning the *CodeSniffer*. ``` * @return $this */ private function a

USPATDHK5 Posts: 60 🧑🏻‍🚀 - Cadet

Hey guys,
I have a question concerning the CodeSniffer.

 * @return $this
private function addCategoryDescriptionField(FormBuilderInterface $builder): CategoryLocalizedAttributeType

I have this function with “@return this” annotation and therefore CategoryLocalizedAttributeType as returntype. I want to keep it like that - the Codesniffer returns the attached result.
When I try to adjust my ruleset.xml accordingly, and try to exclude the TypeHint.Invalid.Self

<rule ref="TypeHint.Invalid.Self">

I receive the error message Registering sniffs in the SprykerProject standard... ERROR: Referenced sniff "TypeHint.Invalid.Self" does not exist

Can anyone help me? 🙂


    UKHD8KTMF Posts: 393 🧑🏻‍🚀 - Cadet

    just add exclude section to your ruleset.xml i.e

        <rule ref="vendor/spryker/code-sniffer/Spryker/ruleset.xml">
            <exclude name="Spryker.Commenting.FileDocBlock"/>
    UKHD8KTMF Posts: 393 🧑🏻‍🚀 - Cadet
    edited May 2020

    maybe you can use channel next time, you will get help faster there