Mercurial > hg > isophonics-drupal-site
diff vendor/drupal/coder/coder_sniffer/DrupalPractice/Sniffs/Constants/GlobalDefineSniff.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 |
line wrap: on
line diff
--- a/vendor/drupal/coder/coder_sniffer/DrupalPractice/Sniffs/Constants/GlobalDefineSniff.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/drupal/coder/coder_sniffer/DrupalPractice/Sniffs/Constants/GlobalDefineSniff.php Thu Feb 28 13:21:36 2019 +0000 @@ -1,12 +1,18 @@ <?php /** - * DrupalPractice_Sniffs_Constants_GlobalDefineSniff + * \DrupalPractice\Sniffs\Constants\GlobalDefineSniff * * @category PHP * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ +namespace DrupalPractice\Sniffs\Constants; + +use PHP_CodeSniffer\Files\File; +use Drupal\Sniffs\Semantics\FunctionCall; +use DrupalPractice\Project; + /** * Checks that global define() constants are not used in modules in Drupal 8. * @@ -14,7 +20,7 @@ * @package PHP_CodeSniffer * @link http://pear.php.net/package/PHP_CodeSniffer */ -class DrupalPractice_Sniffs_Constants_GlobalDefineSniff extends Drupal_Sniffs_Semantics_FunctionCall +class GlobalDefineSniff extends FunctionCall { @@ -33,18 +39,18 @@ /** * Processes this function call. * - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. - * @param int $stackPtr The position of the function call in - * the stack. - * @param int $openBracket The position of the opening - * parenthesis in the stack. - * @param int $closeBracket The position of the closing - * parenthesis in the stack. + * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned. + * @param int $stackPtr The position of the function call in + * the stack. + * @param int $openBracket The position of the opening + * parenthesis in the stack. + * @param int $closeBracket The position of the closing + * parenthesis in the stack. * * @return void */ public function processFunctionCall( - PHP_CodeSniffer_File $phpcsFile, + File $phpcsFile, $stackPtr, $openBracket, $closeBracket @@ -56,7 +62,7 @@ return; } - $coreVersion = DrupalPractice_Project::getCoreVersion($phpcsFile); + $coreVersion = Project::getCoreVersion($phpcsFile); if ($coreVersion !== '8.x') { return; }