original_string: protected static function readParameter(\Jstewmc\Stream\Stream $stream)
  	{
  		$parameter = '';
  		
  		// if the current character is a digit or hyphen ("-")
  		if (ctype_digit($stream->current()) || $stream->current() == '-') {
  			// determine if the parameter is negative
  			$isNegative = ($stream->current() == '-'); 
  			
  			// if the number is negative, consume the hyphen
  			if ($isNegative) {
  				$stream->next();
  			}
  			
  			// loop through the digits and append them to the parameter
  			while (ctype_digit($stream->current())) {
  				$parameter .= $stream->current();
  				$stream->next();
  			} 
  						
  			// evaluate the parameter's numeric value
  			$parameter = +$parameter;
  		
  			// if the parameter is negative, negate it
  			if ($isNegative) {
  				$parameter = -$parameter;	
  			}
  		} else {
  			throw new \InvalidArgumentException(
  				__METHOD__."() expects the current element in parameter one, characters, "
  					. "to be a digit or hyphen"
  			);
  		}
  		
  		return $parameter;
  	}
code: protected static function readParameter(\Jstewmc\Stream\Stream $stream)
  	{
  		$parameter = '';
  		
  		// if the current character is a digit or hyphen ("-")
  		if (ctype_digit($stream->current()) || $stream->current() == '-') {
  			// determine if the parameter is negative
  			$isNegative = ($stream->current() == '-'); 
  			
  			// if the number is negative, consume the hyphen
  			if ($isNegative) {
  				$stream->next();
  			}
  			
  			// loop through the digits and append them to the parameter
  			while (ctype_digit($stream->current())) {
  				$parameter .= $stream->current();
  				$stream->next();
  			} 
  						
  			// evaluate the parameter's numeric value
  			$parameter = +$parameter;
  		
  			// if the parameter is negative, negate it
  			if ($isNegative) {
  				$parameter = -$parameter;	
  			}
  		} else {
  			throw new \InvalidArgumentException(
  				__METHOD__."() expects the current element in parameter one, characters, "
  					. "to be a digit or hyphen"
  			);
  		}
  		
  		return $parameter;
  	}
code_tokens: protected static function readParameter ( \ Jstewmc \ Stream \ Stream $ stream ) { $ parameter = '' ; // if the current character is a digit or hyphen ("-") if ( ctype_digit ( $ stream -> current ( ) ) || $ stream -> current ( ) == '-' ) { // determine if the parameter is negative $ isNegative = ( $ stream -> current ( ) == '-' ) ; // if the number is negative, consume the hyphen if ( $ isNegative ) { $ stream -> next ( ) ; } // loop through the digits and append them to the parameter while ( ctype_digit ( $ stream -> current ( ) ) ) { $ parameter .= $ stream -> current ( ) ; $ stream -> next ( ) ; } // evaluate the parameter's numeric value $ parameter = + $ parameter ; // if the parameter is negative, negate it if ( $ isNegative ) { $ parameter = - $ parameter ; } } else { throw new \ InvalidArgumentException ( __METHOD__ . "() expects the current element in parameter one, characters, " . "to be a digit or hyphen" ) ; } return $ parameter ; }
docstring: Reads a control word's parameter from the characters stream
  
  @param  Jstewmc\Stream  $stream  a stream of characters (the current character
  must be a digit or hyphen)
  @return  int
  @throws  InvalidArgumentException  if the current character in $stream is
  not a digit or hyphen
  @since  0.1.0
  @since  0.2.0  replace argument $characters, an array of characters, with $stream
  an instance of Jstewmc\Stream
docstring_tokens: Reads a control word s parameter from the characters stream