File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1082,6 +1082,29 @@ final class SomeFixture extends AbstractFixture
10821082
10831083## 3. Symfony-specific Rules
10841084
1085+ ### NoGetDoctrineInControllerRule
1086+
1087+ Prevents using ` $this->getDoctrine() ` in controllers, to promote dependency injection.
1088+
1089+ ``` yaml
1090+ rules :
1091+ - Symplify\PHPStanRules\Rules\Symfony\NoGetDoctrineInControllerRule
1092+ ` ` `
1093+
1094+ <br>
1095+
1096+ ### NoGetInControllerRule
1097+
1098+ Prevents using ` $this->get(...)` in controllers, to promote dependency injection.
1099+
1100+ ` ` ` yaml
1101+ rules:
1102+ - Symplify\P HPStanRules\R ules\S ymfony\N oGetInControllerRule
1103+ ` ` `
1104+
1105+ <br>
1106+
1107+
10851108# ## NoAbstractControllerConstructorRule
10861109
10871110Abstract controller should not have constructor, as it can lead to tight coupling. Use @required annotation instead
You can’t perform that action at this time.
0 commit comments