comparison vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Semantics/FunctionAliasSniff.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
1 <?php 1 <?php
2 /** 2 /**
3 * Drupal_Sniffs_Semantics_FunctionAliasSniff 3 * \Drupal\Sniffs\Semantics\FunctionAliasSniff
4 * 4 *
5 * @category PHP 5 * @category PHP
6 * @package PHP_CodeSniffer 6 * @package PHP_CodeSniffer
7 * @link http://pear.php.net/package/PHP_CodeSniffer 7 * @link http://pear.php.net/package/PHP_CodeSniffer
8 */ 8 */
9
10 namespace Drupal\Sniffs\Semantics;
11
12 use Drupal\Sniffs\Semantics\FunctionCall;
13 use PHP_CodeSniffer\Files\File;
9 14
10 /** 15 /**
11 * Checks that no PHP function name aliases are used. 16 * Checks that no PHP function name aliases are used.
12 * 17 *
13 * @category PHP 18 * @category PHP
14 * @package PHP_CodeSniffer 19 * @package PHP_CodeSniffer
15 * @link http://pear.php.net/package/PHP_CodeSniffer 20 * @link http://pear.php.net/package/PHP_CodeSniffer
16 */ 21 */
17 class Drupal_Sniffs_Semantics_FunctionAliasSniff extends Drupal_Sniffs_Semantics_FunctionCall 22 class FunctionAliasSniff extends FunctionCall
18 { 23 {
19 24
20 /** 25 /**
21 * Holds all PHP function name aliases (keys) and originals (values). See 26 * Holds all PHP function name aliases (keys) and originals (values). See
22 * http://php.net/manual/en/aliases.php 27 * http://php.net/manual/en/aliases.php
189 194
190 195
191 /** 196 /**
192 * Processes this function call. 197 * Processes this function call.
193 * 198 *
194 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. 199 * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
195 * @param int $stackPtr The position of the function call in 200 * @param int $stackPtr The position of the function call in
196 * the stack. 201 * the stack.
197 * @param int $openBracket The position of the opening 202 * @param int $openBracket The position of the opening
198 * parenthesis in the stack. 203 * parenthesis in the stack.
199 * @param int $closeBracket The position of the closing 204 * @param int $closeBracket The position of the closing
200 * parenthesis in the stack. 205 * parenthesis in the stack.
201 * 206 *
202 * @return void 207 * @return void
203 */ 208 */
204 public function processFunctionCall( 209 public function processFunctionCall(
205 PHP_CodeSniffer_File $phpcsFile, 210 File $phpcsFile,
206 $stackPtr, 211 $stackPtr,
207 $openBracket, 212 $openBracket,
208 $closeBracket 213 $closeBracket
209 ) { 214 ) {
210 $tokens = $phpcsFile->getTokens(); 215 $tokens = $phpcsFile->getTokens();