src/LineNumberAwareTrait.php
protected function _setLineNumber($lineNumber)
    {
        if ($lineNumber !== null) {
            try {
                $lineNumber = $this->_normalizeInt($lineNumber);
            } catch (RootException $e) {
                throw $this->_createInvalidArgumentException($this->__('Invalid line number'), null, $e, $lineNumber);
            }

            if ($lineNumber < 1) {
                throw $this->_createInvalidArgumentException($this->__('Line number must be positive'), null, null, $lineNumber);
            }
        }

        $this->lineNumber = $lineNumber;
    }
protected function _setLineNumber($lineNumber)
    {
        if ($lineNumber !== null) {
            try {
                $lineNumber = $this->_normalizeInt($lineNumber);
            } catch (RootException $e) {
                throw $this->_createInvalidArgumentException($this->__('Invalid line number'), null, $e, $lineNumber);
            }

            if ($lineNumber < 1) {
                throw $this->_createInvalidArgumentException($this->__('Line number must be positive'), null, null, $lineNumber);
            }
        }

        $this->lineNumber = $lineNumber;
    }
protected function _setLineNumber ( $ lineNumber ) { if ( $ lineNumber !== null ) { try { $ lineNumber = $ this -> _normalizeInt ( $ lineNumber ) ; } catch ( RootException $ e ) { throw $ this -> _createInvalidArgumentException ( $ this -> __ ( 'Invalid line number' ) , null , $ e , $ lineNumber ) ; } if ( $ lineNumber < 1 ) { throw $ this -> _createInvalidArgumentException ( $ this -> __ ( 'Line number must be positive' ) , null , null , $ lineNumber ) ; } } $ this -> lineNumber = $ lineNumber ; }
Assigns a line number to this instance.

@since [*next-version*]

@param int|string|Stringable|float|null $lineNumber The line number.
Must be a whole positive number.
Assigns a line number to this instance .