process() public method

Processes this test, when one of its tokens is encountered.
public process ( PHP_CodeSniffer_File $phpcsFile, integer $stackPtr ) : integer
$phpcsFile PHP_CodeSniffer_File The file being scanned.
$stackPtr integer The position of the current token in the stack passed in $tokens.
return integer
コード例 #1
0
ファイル: LineLengthSniff.php プロジェクト: dariogs/moosh
 public function process(PHP_CodeSniffer_File $file, $stackptr)
 {
     // Lang files are allowed to have long lines.
     if (strpos($file->getFilename(), DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR) !== false) {
         return;
     }
     parent::process($file, $stackptr);
 }
コード例 #2
0
 /**
  * Processes this test, when one of its tokens is encountered.
  *
  * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
  * @param int $stackPtr The position of the current token in the stack passed in $tokens.
  *
  * @return int
  */
 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
 {
     return parent::process($phpcsFile, $stackPtr);
 }