original_string: public function validate($code) {
  		$code = $this->_normalize($code, ['clean' => true, 'case' => true]);
  
  		if (strlen($code) !== ($this->_parts * $this->_partLength)) {
  			return false;
  		}
  		$parts = str_split($code, $this->_partLength);
  
  		foreach ($parts as $number => $part) {
  			$expected = substr($part, -1);
  			$result = $this->_checkdigitAlg1($number + 1, $x = substr($part, 0, strlen($part) - 1));
  
  			if ($result !== $expected) {
  				return false;
  			}
  		}
  		return true;
  	}
code: public function validate($code) {
  		$code = $this->_normalize($code, ['clean' => true, 'case' => true]);
  
  		if (strlen($code) !== ($this->_parts * $this->_partLength)) {
  			return false;
  		}
  		$parts = str_split($code, $this->_partLength);
  
  		foreach ($parts as $number => $part) {
  			$expected = substr($part, -1);
  			$result = $this->_checkdigitAlg1($number + 1, $x = substr($part, 0, strlen($part) - 1));
  
  			if ($result !== $expected) {
  				return false;
  			}
  		}
  		return true;
  	}
code_tokens: public function validate ( $ code ) { $ code = $ this -> _normalize ( $ code , [ 'clean' => true , 'case' => true ] ) ; if ( strlen ( $ code ) !== ( $ this -> _parts * $ this -> _partLength ) ) { return false ; } $ parts = str_split ( $ code , $ this -> _partLength ) ; foreach ( $ parts as $ number => $ part ) { $ expected = substr ( $ part , - 1 ) ; $ result = $ this -> _checkdigitAlg1 ( $ number + 1 , $ x = substr ( $ part , 0 , strlen ( $ part ) - 1 ) ) ; if ( $ result !== $ expected ) { return false ; } } return true ; }
docstring: Validates given code. Codes are not case sensitive and
  certain letters i.e. `O` are converted to digit equivalents
  i.e. `0`.
  
  @param $code string Potentially unnormalized code.
  @return boolean
docstring_tokens: Validates given code . Codes are not case sensitive and certain letters i . e . O are converted to digit equivalents i . e . 0 .