diff options
author | Tristan Darricau <github@nicofuma.fr> | 2015-01-17 00:09:06 +0100 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2015-01-17 00:09:06 +0100 |
commit | 6b92fccd06b51b95c1941861f7a3d8ee5c1b9b06 (patch) | |
tree | 4e3db22ca53de6830dede894e56729f13094c5b8 | |
parent | e3e16a0166eafc9f273d3eabc61a8bd711610787 (diff) | |
download | forums-6b92fccd06b51b95c1941861f7a3d8ee5c1b9b06.tar forums-6b92fccd06b51b95c1941861f7a3d8ee5c1b9b06.tar.gz forums-6b92fccd06b51b95c1941861f7a3d8ee5c1b9b06.tar.bz2 forums-6b92fccd06b51b95c1941861f7a3d8ee5c1b9b06.tar.xz forums-6b92fccd06b51b95c1941861f7a3d8ee5c1b9b06.zip |
[ticket/13511] Call the check() method with the phpcsFile object
PHPBB3-13511
-rw-r--r-- | build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php b/build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php index 87e676b8ff..18cb8ba82e 100644 --- a/build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php +++ b/build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php @@ -24,7 +24,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff return array(T_USE); } - protected function check($found_name, $full_name, $short_name, $line) + protected function check($phpcsFile, $found_name, $full_name, $short_name, $line) { if ($found_name === $full_name) @@ -91,7 +91,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff $simple_class_name = trim($phpcsFile->getTokensAsString($simple_class_name_start, ($simple_class_name_end - $simple_class_name_start))); - $ok = $this->check($simple_class_name, $class_name_full, $class_name_short, $simple_statement) ? true : $ok; + $ok = $this->check($phpcsFile, $simple_class_name, $class_name_full, $class_name_short, $simple_statement) ? true : $ok; } } @@ -106,7 +106,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff $paamayim_nekudotayim_class_name = trim($phpcsFile->getTokensAsString($paamayim_nekudotayim_class_name_start + 1, ($paamayim_nekudotayim_class_name_end - $paamayim_nekudotayim_class_name_start))); - $ok = $this->check($paamayim_nekudotayim_class_name, $class_name_full, $class_name_short, $paamayim_nekudotayim) ? true : $ok; + $ok = $this->check($phpcsFile, $paamayim_nekudotayim_class_name, $class_name_full, $class_name_short, $paamayim_nekudotayim) ? true : $ok; } // Checks in implements @@ -125,7 +125,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff $implements_class_name = trim($phpcsFile->getTokensAsString($implements_class_name_start, ($implements_class_name_end - $implements_class_name_start))); - $ok = $this->check($implements_class_name, $class_name_full, $class_name_short, $implements) ? true : $ok; + $ok = $this->check($phpcsFile, $implements_class_name, $class_name_full, $class_name_short, $implements) ? true : $ok; } } @@ -163,7 +163,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff $types = explode('|', str_replace('[]', '', $type)); foreach ($types as $type) { - $ok = $this->check($type, $class_name_full, $class_name_short, $param->getLine() + $comment_start) ? true : $ok; + $ok = $this->check($phpcsFile, $type, $class_name_full, $class_name_short, $param->getLine() + $comment_start) ? true : $ok; } } @@ -175,7 +175,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff $types = explode('|', str_replace('[]', '', $type)); foreach ($types as $type) { - $ok = $this->check($type, $class_name_full, $class_name_short, $return->getLine() + $comment_start) ? true : $ok; + $ok = $this->check($phpcsFile, $type, $class_name_full, $class_name_short, $return->getLine() + $comment_start) ? true : $ok; } } } @@ -191,7 +191,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff $params = $phpcsFile->getMethodParameters($function_declaration); foreach ($params as $param) { - $ok = $this->check($param['type_hint'], $class_name_full, $class_name_short, $function_declaration) ? true : $ok; + $ok = $this->check($phpcsFile, $param['type_hint'], $class_name_full, $class_name_short, $function_declaration) ? true : $ok; } } |