Is there a possibility to skip a rule based on class attribute? #8694
-
Hello! Have a good day! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
Why you skip it? is there error when using the rule? |
Beta Was this translation helpful? Give feedback.
-
I've a similar use case: I would like to skip The background is, that those classes are value objects mapping json payloads, which are partial. So the only way I can still know if a property was present in the json is by checking if the property was set. With rector setting nullable properties to |
Beta Was this translation helpful? Give feedback.
I see. In that case it's better to use the skip feature suggested by @samsonasik
I do this for some other rules, that I personally don't like in entities:
This is the best and easiest way I can think of 👍