package com.cedricziel.idea.typo3.codeInspection;

import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.psi.PsiElementVisitor;
import com.jetbrains.php.lang.documentation.phpdoc.psi.PhpDocType;
import com.jetbrains.php.lang.inspections.PhpInspection;
import com.jetbrains.php.lang.psi.visitors.PhpElementVisitor;
import org.jetbrains.annotations.NotNull;

public class ExtbasePropertyInjectionInspection  extends PhpInspection{
    @NotNull
    @Override
    public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder problemsHolder, boolean b) {
        return new PhpElementVisitor() {
            @Override
            public void visitPhpDocType(PhpDocType type) {
                super.visitPhpDocType(type);
            }
        };
    }
}

@@ -44,16 +44,67 @@
 ction;%0A%0A
+import com.intellij.codeInsight.daemon.GroupNames;%0A
 import c
@@ -244,26 +244,30 @@
 doc.psi.
+tags.
 PhpDocT
-ype
+ag
 ;%0Aimport
@@ -317,16 +317,74 @@
 ection;%0A
+import com.jetbrains.php.lang.psi.elements.PhpPsiElement;%0A
 import c
@@ -433,24 +433,62 @@
 entVisitor;%0A
+import org.jetbrains.annotations.Nls;%0A
 import org.j
@@ -516,16 +516,59 @@
 NotNull;
+%0Aimport org.jetbrains.annotations.Nullable;
 %0A%0Apublic
@@ -609,17 +609,16 @@
 pection 
- 
 extends 
@@ -634,298 +634,1282 @@
 tion
-%7B%0A    @NotNull%0A    @Override%0A    public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder problemsHolder, boolean b) %7B%0A        return new PhpElementVisitor() %7B%0A            @Override%0A            public void visitPhpDocType(PhpDocType type) %7B%0A                super.visitPhpDocType(type);
+ %7B%0A%0A    @Nls%0A    @NotNull%0A    @Override%0A    public String getGroupDisplayName() %7B%0A        return GroupNames.PERFORMANCE_GROUP_NAME;%0A    %7D%0A%0A    @Nullable%0A    @Override%0A    public String getStaticDescription() %7B%0A        return %22Property injection uses reflection to insert dependencies.%5Cn%22 +%0A                %22The alternative to property injection is setter-injection.%5Cn%22 +%0A                %22You should much rather use setter-injection:%5Cn%22 +%0A                %22%3Cpre%3E%22 +%0A                %22protected $myService;%5Cn%22 +%0A                %22%5Cn%22 +%0A                %22public function injectMyService(MyService $myService) %7B%5Cn%22 +%0A                %22   $this-%3EmyService = $myService;%5Cn%22 +%0A                %22%7D%5Cn%22 +%0A                %22%3C/pre%3E%22;%0A    %7D%0A%0A    @NotNull%0A    @Override%0A    public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder problemsHolder, boolean b) %7B%0A        return new PhpElementVisitor() %7B%0A            @Override%0A            public void visitPhpElement(PhpPsiElement element) %7B%0A                if (element instanceof PhpDocTag) %7B%0A                    PhpDocTag tag = (PhpDocTag) element;%0A                    if (tag.getName().equals(%22@inject%22)) %7B%0A                        problemsHolder.registerProblem(element, %22Extbase property injection%22);%0A                    %7D%0A                %7D
 %0A   

Add extbase @inject performance inspection