[ 0 => self::NormalSale, 1 => self::NormalRefund, ], 1 => [ 0 => self::ProformaSale, 1 => self::ProformaRefund, ], 2 => [ 0 => self::CopySale, 1 => self::CopyRefund, ], 3 => [ 0 => self::TrainingSale, 1 => self::TrainingRefund, ], 4 => [ 0 => self::AdvanceSale, 1 => self::AdvanceRefund, ], ]; if (!isset($matrix[$invoiceType])) { throw new InvalidArgumentException('Invalid value provided for invoice type.'); } if (!isset($matrix[$invoiceType][$transactionType])) { throw new InvalidArgumentException('Invalid value provided for transaction type.'); } return $matrix[$invoiceType][$transactionType]; } }