Mercurial > hg > isophonics-drupal-site
comparison vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/FileCommentSniff.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 |
---|---|
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\Commenting; | |
11 | |
12 use PHP_CodeSniffer\Files\File; | |
13 use PHP_CodeSniffer\Sniffs\Sniff; | |
9 | 14 |
10 /** | 15 /** |
11 * Parses and verifies the doc comments for files. | 16 * Parses and verifies the doc comments for files. |
12 * | 17 * |
13 * Verifies that : | 18 * Verifies that : |
19 * @category PHP | 24 * @category PHP |
20 * @package PHP_CodeSniffer | 25 * @package PHP_CodeSniffer |
21 * @link http://pear.php.net/package/PHP_CodeSniffer | 26 * @link http://pear.php.net/package/PHP_CodeSniffer |
22 */ | 27 */ |
23 | 28 |
24 class Drupal_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff | 29 class FileCommentSniff implements Sniff |
25 { | 30 { |
26 | 31 |
27 | 32 |
28 /** | 33 /** |
29 * A list of tokenizers this sniff supports. | 34 * A list of tokenizers this sniff supports. |
49 | 54 |
50 | 55 |
51 /** | 56 /** |
52 * Processes this test, when one of its tokens is encountered. | 57 * Processes this test, when one of its tokens is encountered. |
53 * | 58 * |
54 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. | 59 * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. |
55 * @param int $stackPtr The position of the current token | 60 * @param int $stackPtr The position of the current token |
56 * in the stack passed in $tokens. | 61 * in the stack passed in $tokens. |
57 * | 62 * |
58 * @return int | 63 * @return int |
59 */ | 64 */ |
60 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) | 65 public function process(File $phpcsFile, $stackPtr) |
61 { | 66 { |
62 $this->currentFile = $phpcsFile; | 67 $this->currentFile = $phpcsFile; |
63 | 68 |
64 $tokens = $phpcsFile->getTokens(); | 69 $tokens = $phpcsFile->getTokens(); |
65 $commentStart = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); | 70 $commentStart = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); |