You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should add a linting rule that enforces this and fails if self is used.
There is a documented exception to this with traits.
Acceptance criteria
Outside of traits, any use of the keyword self results in CI failure
In traits, self is only directly used to get the class name, const values, or as type hints. For everything else, self::class is used first, e.g. self::class::myMethod()
We've recently updated our coding standards to avoid using
self
.We should add a linting rule that enforces this and fails if
self
is used.There is a documented exception to this with traits.
Acceptance criteria
self
results in CI failureself
is only directly used to get the class name, const values, or as type hints. For everything else,self::class
is used first, e.g.self::class::myMethod()
PR
The text was updated successfully, but these errors were encountered: