original_string: public static function fromInteger(int $vat = null): Tax
      {
          $mapping = [
              0 => self::VAT0,
              10 => self::VAT110,
              18 => self::VAT118,
          ];
  
          if (null === $vat) {
              return new self(self::NONE);
          }
  
          if (!isset($mapping[$vat])) {
              throw VatException::becauseUnknownVatValue($vat);
          }
  
          return new self($mapping[$vat]);
      }
code: public static function fromInteger(int $vat = null): Tax
      {
          $mapping = [
              0 => self::VAT0,
              10 => self::VAT110,
              18 => self::VAT118,
          ];
  
          if (null === $vat) {
              return new self(self::NONE);
          }
  
          if (!isset($mapping[$vat])) {
              throw VatException::becauseUnknownVatValue($vat);
          }
  
          return new self($mapping[$vat]);
      }
code_tokens: public static function fromInteger ( int $ vat = null ) : Tax { $ mapping = [ 0 => self :: VAT0 , 10 => self :: VAT110 , 18 => self :: VAT118 , ] ; if ( null === $ vat ) { return new self ( self :: NONE ) ; } if ( ! isset ( $ mapping [ $ vat ] ) ) { throw VatException :: becauseUnknownVatValue ( $ vat ) ; } return new self ( $ mapping [ $ vat ] ) ; }
docstring: Get tax by integer value.
  
  @param int|null $vat
  
  @return Tax
docstring_tokens: Get tax by integer value .