src/AuthenticatorOptionsTrait.php
protected function set_digits(int $digits):void{

		if(!in_array($digits, [6, 8], true)){
			throw new AuthenticatorException('Invalid code length: '.$digits);
		}

		$this->digits = $digits;
	}
protected function set_digits(int $digits):void{

		if(!in_array($digits, [6, 8], true)){
			throw new AuthenticatorException('Invalid code length: '.$digits);
		}

		$this->digits = $digits;
	}
protected function set_digits ( int $ digits ) : void { if ( ! in_array ( $ digits , [ 6 , 8 ] , true ) ) { throw new AuthenticatorException ( 'Invalid code length: ' . $ digits ) ; } $ this -> digits = $ digits ; }
Sets the code length to either 6 or 8

@param int $digits

@return void
@throws \chillerlan\Authenticator\AuthenticatorException
Sets the code length to either 6 or 8