/**
  * Constructs a SocialEngine_Sniffs_Methods_MethodNameSniff.
  */
 public function __construct()
 {
     parent::__construct();
     $rawAllowSnakeCaseMethodName = PHP_CodeSniffer::getConfigData('allowSnakeCaseMethodName');
     if (!is_null($rawAllowSnakeCaseMethodName)) {
         $this->allowSnakeCaseMethodName = json_decode($rawAllowSnakeCaseMethodName, true);
     }
 }
 /**
  * Processes the tokens within the scope.
  * @param PHP_CodeSniffer_File $phpcsFile The file being processed.
  * @param int $stackPtr The position where this token was
  *                                        found.
  * @param int $currScope The position of the current scope.
  * @return void
  */
 protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope)
 {
     if ($namespace = $phpcsFile->findNext(T_NAMESPACE, 1)) {
         $tokens = $phpcsFile->getTokens();
         if (isset($tokens[$namespace + 2]) && in_array($tokens[$namespace + 2]['content'], ['spec', 'spec_nightly'])) {
             return;
         }
     }
     parent::processTokenWithinScope($phpcsFile, $stackPtr, $currScope);
 }