From 48cbd93eb28bbc21229240a7373cef6f459ee2cf Mon Sep 17 00:00:00 2001 From: Ryan Matthews Date: Mon, 30 Nov 2015 10:33:22 -0500 Subject: [PATCH] Clean up undefined customAllowedTypes --- .../Barracuda/Sniffs/Commenting/FunctionCommentSniff.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PHP_CodeSniffer/Barracuda/Sniffs/Commenting/FunctionCommentSniff.php b/PHP_CodeSniffer/Barracuda/Sniffs/Commenting/FunctionCommentSniff.php index 7eb64da..ffce82b 100644 --- a/PHP_CodeSniffer/Barracuda/Sniffs/Commenting/FunctionCommentSniff.php +++ b/PHP_CodeSniffer/Barracuda/Sniffs/Commenting/FunctionCommentSniff.php @@ -345,7 +345,7 @@ protected function processParams(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $co $typeNames = explode('|', $param['type']); foreach ($typeNames as $typeName) { $suggestedName = PHP_CodeSniffer::suggestType($typeName); - if ($typeName !== $suggestedName && !in_array($typeName, $this->customAllowedTypes)) { + if ($typeName !== $suggestedName) { $error = 'Expected "%s" but found "%s" for parameter type'; $data = array( $suggestedName, @@ -364,7 +364,7 @@ protected function processParams(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $co $phpcsFile->fixer->replaceToken(($param['tag'] + 2), $content); } - } else if (count($typeNames) === 1 && !in_array($typeName, $this->customAllowedTypes)) { + } else if (count($typeNames) === 1) { // Check type hint for array and custom type. $suggestedTypeHint = ''; if (strpos($suggestedName, 'array') !== false || substr($suggestedName, -2) === '[]') {