Mercurial > hg > isophonics-drupal-site
comparison vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Semantics/FunctionWatchdogSniff.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_Semanitcs_FunctionWatchdogSniff. | 3 * \Drupal\Sniffs\Semantics\FunctionWatchdogSniff. |
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 the second argument to watchdog() is not enclosed with t(). | 16 * Checks that the second argument to watchdog() is not enclosed with t(). |
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_FunctionWatchdogSniff extends Drupal_Sniffs_Semantics_FunctionCall | 22 class FunctionWatchdogSniff extends FunctionCall |
18 { | 23 { |
19 | 24 |
20 | 25 |
21 /** | 26 /** |
22 * Returns an array of function names this test wants to listen for. | 27 * Returns an array of function names this test wants to listen for. |
31 | 36 |
32 | 37 |
33 /** | 38 /** |
34 * Processes this function call. | 39 * Processes this function call. |
35 * | 40 * |
36 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. | 41 * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. |
37 * @param int $stackPtr The position of the function call in | 42 * @param int $stackPtr The position of the function call in |
38 * the stack. | 43 * the stack. |
39 * @param int $openBracket The position of the opening | 44 * @param int $openBracket The position of the opening |
40 * parenthesis in the stack. | 45 * parenthesis in the stack. |
41 * @param int $closeBracket The position of the closing | 46 * @param int $closeBracket The position of the closing |
42 * parenthesis in the stack. | 47 * parenthesis in the stack. |
43 * | 48 * |
44 * @return void | 49 * @return void |
45 */ | 50 */ |
46 public function processFunctionCall( | 51 public function processFunctionCall( |
47 PHP_CodeSniffer_File $phpcsFile, | 52 File $phpcsFile, |
48 $stackPtr, | 53 $stackPtr, |
49 $openBracket, | 54 $openBracket, |
50 $closeBracket | 55 $closeBracket |
51 ) { | 56 ) { |
52 $tokens = $phpcsFile->getTokens(); | 57 $tokens = $phpcsFile->getTokens(); |