private function _processClassStatement() {
		$isAfterScopeResolutionOperator = $this->tokenizer->checkPreviousToken(T_DOUBLE_COLON);
		if ($isAfterScopeResolutionOperator) {
			return;
		}

		// Check PHPDoc presence
		$this->_checkDocExists(T_CLASS);

		$this->_ncssTotalClasses ++;
		$this->_ncssFileClasses ++;

		// Test if there is more than one class per file
		if ($this->_isActive('oneClassPerFile') && $this->_ncssFileClasses > 1) {
			$msg = $this->_getMessage('ONE_CLASS_PER_FILE', $this->_currentFilename);
			$this->_writeError('oneClassPerFile', $msg);
		}

		// Reset the default values
		$this->_inFunction = false;
		$this->_nbFunctionParameters = 0;
		$this->_functionParameters = array();
		$this->_inFunctionStatement = false;
		$this->_functionReturns = false;
		$this->_functionThrows = false;
		$this->_inControlStatement = false;
		$this->_currentStatement = false;
		$this->_inClassStatement = true;

		// skip until T_STRING representing the class name
		while (!$this->tokenizer->checkCurrentToken(T_STRING)) {
			$this->tokenizer->getNextToken();
		}

		$token = $this->tokenizer->getCurrentToken();
		$classname = $token->text;
		$this->_currentClassname = $classname;

		// Test that the class name matches the file name
		$this->_checkTypeNameFileNameMatch($classname);

		// Check class naming
		$this->_checkClassNaming($classname);

		$this->_checkWhiteSpaceAfter($classname);
	}
private function _processClassStatement() {
		$isAfterScopeResolutionOperator = $this->tokenizer->checkPreviousToken(T_DOUBLE_COLON);
		if ($isAfterScopeResolutionOperator) {
			return;
		}

		// Check PHPDoc presence
		$this->_checkDocExists(T_CLASS);

		$this->_ncssTotalClasses ++;
		$this->_ncssFileClasses ++;

		// Test if there is more than one class per file
		if ($this->_isActive('oneClassPerFile') && $this->_ncssFileClasses > 1) {
			$msg = $this->_getMessage('ONE_CLASS_PER_FILE', $this->_currentFilename);
			$this->_writeError('oneClassPerFile', $msg);
		}

		// Reset the default values
		$this->_inFunction = false;
		$this->_nbFunctionParameters = 0;
		$this->_functionParameters = array();
		$this->_inFunctionStatement = false;
		$this->_functionReturns = false;
		$this->_functionThrows = false;
		$this->_inControlStatement = false;
		$this->_currentStatement = false;
		$this->_inClassStatement = true;

		// skip until T_STRING representing the class name
		while (!$this->tokenizer->checkCurrentToken(T_STRING)) {
			$this->tokenizer->getNextToken();
		}

		$token = $this->tokenizer->getCurrentToken();
		$classname = $token->text;
		$this->_currentClassname = $classname;

		// Test that the class name matches the file name
		$this->_checkTypeNameFileNameMatch($classname);

		// Check class naming
		$this->_checkClassNaming($classname);

		$this->_checkWhiteSpaceAfter($classname);
	}
private function _processClassStatement ( ) { $ isAfterScopeResolutionOperator = $ this -> tokenizer -> checkPreviousToken ( T_DOUBLE_COLON ) ; if ( $ isAfterScopeResolutionOperator ) { return ; } // Check PHPDoc presence $ this -> _checkDocExists ( T_CLASS ) ; $ this -> _ncssTotalClasses ++ ; $ this -> _ncssFileClasses ++ ; // Test if there is more than one class per file if ( $ this -> _isActive ( 'oneClassPerFile' ) && $ this -> _ncssFileClasses > 1 ) { $ msg = $ this -> _getMessage ( 'ONE_CLASS_PER_FILE' , $ this -> _currentFilename ) ; $ this -> _writeError ( 'oneClassPerFile' , $ msg ) ; } // Reset the default values $ this -> _inFunction = false ; $ this -> _nbFunctionParameters = 0 ; $ this -> _functionParameters = array ( ) ; $ this -> _inFunctionStatement = false ; $ this -> _functionReturns = false ; $ this -> _functionThrows = false ; $ this -> _inControlStatement = false ; $ this -> _currentStatement = false ; $ this -> _inClassStatement = true ; // skip until T_STRING representing the class name while ( ! $ this -> tokenizer -> checkCurrentToken ( T_STRING ) ) { $ this -> tokenizer -> getNextToken ( ) ; } $ token = $ this -> tokenizer -> getCurrentToken ( ) ; $ classname = $ token -> text ; $ this -> _currentClassname = $ classname ; // Test that the class name matches the file name $ this -> _checkTypeNameFileNameMatch ( $ classname ) ; // Check class naming $ this -> _checkClassNaming ( $ classname ) ; $ this -> _checkWhiteSpaceAfter ( $ classname ) ; }
Process a class declaration statement.
Process a class declaration statement .