private function _checkLargeLine() {
		$checkHTMLLines = $this->_config->getTestProperty('lineLength', 'checkHTMLLines');

		// If the current token is HTML we don't check the line size
		if ($checkHTMLLines === "true" || !$this->tokenizer->checkNextValidToken(T_INLINE_HTML)) {
			$maxLength = $this->_config->getTestProperty('lineLength', 'maxLineLength');
			$lineString = ""; // String assembled from tokens
			$currentTokenIndex = $this->tokenizer->getCurrentPosition();
			$currentToken = $this->tokenizer->getCurrentToken($currentTokenIndex);

			do {
				$currentTokenString = $currentToken->text;
				$lineString .= $currentTokenString;

				$currentTokenIndex += 1;
				$currentToken = $this->tokenizer->peekTokenAt($currentTokenIndex);

				$isNull = ($currentToken === null);
				$isNewLine = !$isNull && $this->tokenizer->checkToken($currentToken, T_NEW_LINE);
			} while (!($isNull || $isNewLine));

			$lineLength = strlen($lineString);

			// Reporting the error if the line length exceeds the defined maximum.
			if ($lineLength > $maxLength) {
				// Does not report if the line is a multiline comment - i.e. has /* in it)
				if (strpos($lineString, "/*")) {
					return;
				}
				$msg = $this->_getMessage('LONG_LINE', $lineLength, $maxLength);
				$this->_writeError('lineLength', $msg);
			}
		}
	}
private function _checkLargeLine() {
		$checkHTMLLines = $this->_config->getTestProperty('lineLength', 'checkHTMLLines');

		// If the current token is HTML we don't check the line size
		if ($checkHTMLLines === "true" || !$this->tokenizer->checkNextValidToken(T_INLINE_HTML)) {
			$maxLength = $this->_config->getTestProperty('lineLength', 'maxLineLength');
			$lineString = ""; // String assembled from tokens
			$currentTokenIndex = $this->tokenizer->getCurrentPosition();
			$currentToken = $this->tokenizer->getCurrentToken($currentTokenIndex);

			do {
				$currentTokenString = $currentToken->text;
				$lineString .= $currentTokenString;

				$currentTokenIndex += 1;
				$currentToken = $this->tokenizer->peekTokenAt($currentTokenIndex);

				$isNull = ($currentToken === null);
				$isNewLine = !$isNull && $this->tokenizer->checkToken($currentToken, T_NEW_LINE);
			} while (!($isNull || $isNewLine));

			$lineLength = strlen($lineString);

			// Reporting the error if the line length exceeds the defined maximum.
			if ($lineLength > $maxLength) {
				// Does not report if the line is a multiline comment - i.e. has /* in it)
				if (strpos($lineString, "/*")) {
					return;
				}
				$msg = $this->_getMessage('LONG_LINE', $lineLength, $maxLength);
				$this->_writeError('lineLength', $msg);
			}
		}
	}
private function _checkLargeLine ( ) { $ checkHTMLLines = $ this -> _config -> getTestProperty ( 'lineLength' , 'checkHTMLLines' ) ; // If the current token is HTML we don't check the line size if ( $ checkHTMLLines === "true" || ! $ this -> tokenizer -> checkNextValidToken ( T_INLINE_HTML ) ) { $ maxLength = $ this -> _config -> getTestProperty ( 'lineLength' , 'maxLineLength' ) ; $ lineString = "" ; // String assembled from tokens $ currentTokenIndex = $ this -> tokenizer -> getCurrentPosition ( ) ; $ currentToken = $ this -> tokenizer -> getCurrentToken ( $ currentTokenIndex ) ; do { $ currentTokenString = $ currentToken -> text ; $ lineString .= $ currentTokenString ; $ currentTokenIndex += 1 ; $ currentToken = $ this -> tokenizer -> peekTokenAt ( $ currentTokenIndex ) ; $ isNull = ( $ currentToken === null ) ; $ isNewLine = ! $ isNull && $ this -> tokenizer -> checkToken ( $ currentToken , T_NEW_LINE ) ; } while ( ! ( $ isNull || $ isNewLine ) ) ; $ lineLength = strlen ( $ lineString ) ; // Reporting the error if the line length exceeds the defined maximum. if ( $ lineLength > $ maxLength ) { // Does not report if the line is a multiline comment - i.e. has /* in it) if ( strpos ( $ lineString , "/*" ) ) { return ; } $ msg = $ this -> _getMessage ( 'LONG_LINE' , $ lineLength , $ maxLength ) ; $ this -> _writeError ( 'lineLength' , $ msg ) ; } } }
Check if the current line exceeds the maxLineLength allowed.

Launched at the start of a new line.
Check if the current line exceeds the maxLineLength allowed .