diff --git a/Chadicus/Sniffs/Solid/DependencyInversionSniff.php b/Chadicus/Sniffs/Solid/DependencyInversionSniff.php deleted file mode 100644 index 6b9079e..0000000 --- a/Chadicus/Sniffs/Solid/DependencyInversionSniff.php +++ /dev/null @@ -1,43 +0,0 @@ -getDeclarationName($stackPtr); - if ($methodName !== '__construct') { - //Ingore usage within other methods - return; - } - - $tokens = $phpcsFile->getTokens(); - $scopeStart = $tokens[$stackPtr]['scope_opener']; - $newUsage = $phpcsFile->findNext([T_NEW], ($scopeStart + 1), $tokens[$stackPtr]['scope_closer'], true); - if ($newUsage === false) { - return; - } - - $error = 'Use of NEW within a constructor can be a sign of tight coupling. Consider injecting this dependency.'; - $phpcsFile->addWarning($error, $newUsage, 'Discouraged'); - } -}