For calculation etc

@return array
353212
public function availableCurrencies() {
		if (!isset($this->CurrencyLib)) {
			$this->CurrencyLib = new CurrencyLib();
		}
		$base = $this->baseCurrency();
		$res = $this->CurrencyLib->table($base['code'], 4);
		if ($res) {
			return $res;
		}
		return [];
	}
1172946
protected function extractCharging()
    {
        $result = [];
        $trailer = $this->registries[2];

        foreach (static::CHARGING_TYPES as $type) {
            $count = "${type}_count";
            $total = "${type}_total";
            $warning = "${type}_warning";

            $result = array_merge(
                $result,
                [
                    $count => (int) $trailer->{$count},
                    $total => (float) ($trailer->{$total} / 100.0),
                    $warning => (int) $trailer->{$warning},
                ]
            );
        }

        return $result;
    }
690001
public function getSeverities()
    {
        return array(
            'info' => $this->translation->text('Info'),
            'danger' => $this->translation->text('Danger'),
            'warning' => $this->translation->text('Warning')
        );
    }
585974
protected function makeResult () : array
    {
        $result = [];
        $alreadyDone = [];

        $rang = 1;
        while (count($alreadyDone) < $this->_selfElection->countCandidates()) :
            $winners = $this->getWinners($alreadyDone);

            foreach ($this->_Arcs as $ArcKey => $Arcvalue) :
                foreach ($winners as $oneWinner) :
                    if ($Arcvalue['from'] === $oneWinner || $Arcvalue['to'] === $oneWinner ) :
                        unset($this->_Arcs[$ArcKey]);
                    endif;
                endforeach;
            endforeach;

            $result[$rang++] = $winners;
            $alreadyDone = array_merge($alreadyDone,$winners);
        endwhile;

        return $result;
    }
149697
protected function getAvailableTotals()
    {
        $result = array(
            Meta::InvoiceAmountInc => $this->source['total'],
            Meta::InvoiceVatAmount => 0.0,
            Meta::InvoiceVatBreakdown => array(),
        );

        /** @noinspection PhpUnhandledExceptionInspection */
        $orderTotals = $this->getOrderTotalLines();
        foreach ($orderTotals as $totalLine) {
            if ($totalLine['code'] === 'tax') {
                $result[Meta::InvoiceVatBreakdown][] = $totalLine['title'] . ': ' . $totalLine['value'];
                $result[Meta::InvoiceVatAmount] += $totalLine['value'];
            }
        }
        return $result;
    }
100468
public function getAllElements()
    {
        $paymentSlipData = $this->paymentSlipData;

        $elements = [];
        // Place left bank lines
        if ($this->getDisplayBank()) {
            $lines = [
                $paymentSlipData->getBankName(),
                $paymentSlipData->getBankCity()
            ];
            $elements['bankLeft'] = [
                'lines' => $lines,
                'attributes' => $this->getBankLeftAttr()
            ];

            // Place right bank lines
            // Reuse lines from above
            $elements['bankRight'] = [
                'lines' => $lines,
                'attributes' => $this->getBankRightAttr()
            ];
        }

        // Place left recipient lines
        if ($this->getDisplayRecipient()) {
            $lines = [
                $paymentSlipData->getRecipientLine1(),
                $paymentSlipData->getRecipientLine2(),
                $paymentSlipData->getRecipientLine3(),
                $paymentSlipData->getRecipientLine4()
            ];
            $elements['recipientLeft'] = [
                'lines' => $lines,
                'attributes' => $this->getRecipientLeftAttr()
            ];

            // Place right recipient lines
            // Reuse lines from above
            $elements['recipientRight'] = [
                'lines' => $lines,
                'attributes' => $this->getRecipientRightAttr()
            ];
        }

        // Place left account number
        if ($this->getDisplayAccount()) {
            $lines = [$paymentSlipData->getAccountNumber()];
            $elements['accountLeft'] = [
                'lines' => $lines,
                'attributes' => $this->getAccountLeftAttr()
            ];

            // Place right account number
            // Reuse lines from above
            $elements['accountRight'] = [
                'lines' => $lines,
                'attributes' => $this->getAccountRightAttr()
            ];
        }

        // Place left amount in francs
        if ($this->getDisplayAmount()) {
            $lines = [$paymentSlipData->getAmountFrancs()];
            $elements['amountFrancsLeft'] = [
                'lines' => $lines,
                'attributes' => $this->getAmountFrancsLeftAttr()
            ];

            // Place right amount in francs
            // Reuse lines from above
            $elements['amountFrancsRight'] = [
                'lines' => $lines,
                'attributes' => $this->getAmountFrancsRightAttr()
            ];

            // Place left amount in cents
            $lines = [$paymentSlipData->getAmountCents()];
            $elements['amountCentsLeft'] = [
                'lines' => $lines,
                'attributes' => $this->getAmountCentsLeftAttr()
            ];

            // Place right amount in cents
            // Reuse lines from above
            $elements['amountCentsRight'] = [
                'lines' => $lines,
                'attributes' => $this->getAmountCentsRightAttr()
            ];
        }

        // Place left payer lines
        if ($this->getDisplayPayer()) {
            $lines = [
                $paymentSlipData->getPayerLine1(),
                $paymentSlipData->getPayerLine2(),
                $paymentSlipData->getPayerLine3(),
                $paymentSlipData->getPayerLine4()
            ];
            $elements['payerLeft'] = [
                'lines' => $lines,
                'attributes' => $this->getPayerLeftAttr()
            ];

            // Place right payer lines
            // Reuse lines from above
            $elements['payerRight'] = [
                'lines' => $lines,
                'attributes' => $this->getPayerRightAttr()
            ];
        }

        return $elements;
    }
1336505
public function toArray()
    {
        return array(
            'name'           => $this->getName(),
            'type'           => $this->getType()->getName(),
            'length'         => $this->getLength(),
            'precision'      => $this->getPrecision(),
            'scale'          => $this->getScale(),
            'unsigned'       => $this->isUnsigned(),
            'fixed'          => $this->isFixed(),
            'not_null'       => $this->isNotNull(),
            'default'        => $this->getDefault(),
            'auto_increment' => $this->isAutoIncrement(),
            'comment'        => $this->getComment(),
        );
    }
977083
public function getPriceInfo()
    {
        $aPrices = [];
        foreach ($this->_aList as $oPrice) {
            $sVat = ( string ) $oPrice->getVat();
            if (!isset($aPrices[$sVat])) {
                $aPrices[$sVat] = 0;
            }
            $aPrices[$sVat] += $oPrice->getBruttoPrice();
        }

        return $aPrices;
    }
912998
public function listFunctions() {
		// Return value
		$returnValue = array();
		// Loop functions
		foreach(self::$_PHPExcelFunctions as $functionName => $function) {
			if ($function['functionCall'] != 'PHPExcel_Calculation_Functions::DUMMY') {
				$returnValue[$functionName] = new PHPExcel_Calculation_Function($function['category'],
																				$functionName,
																				$function['functionCall']
																			   );
			}
		}

		// Return
		return $returnValue;
	}
55294
public function getValues()
    {
        $values = [];
        foreach ($this->findScenario() as $name) {
            $values[$name] = $this->$name;
        }
        return $values;
    }
1301370
public function getValues()
    {
        $params = array();
        foreach ($this->expressions as $expr) {
            $values = $expr->getValues();
            foreach ($values as $value) {
                if ($value instanceof \DateTime) {
                    $params[] = $value->format('Y-m-d H:i:s');
                } else {
                    $params[] = $value;
                }
            }
        }

        return $params;
    }
977913
public function getValuesWithModifiers()
    {
        $values = array_map(function ($value) {
            return [$value];
        }, array_flip($this->getValues()));

        $valuesWithModifiers = $values + $this->getModifiers(); // merge and keep keys (append)

        ksort($valuesWithModifiers);

        return $valuesWithModifiers;
    }
346375
protected function getAvailableTotals()
    {
        $sign = $this->getSign();
        if ($this->getType() === Source::Order) {
            $amount = $this->source->getTotalProductsWithoutTaxes()
                      + $this->source->total_shipping_tax_excl
                      + $this->source->total_wrapping_tax_excl
                      - $this->source->total_discounts_tax_excl;
            $amountInc = $this->source->getTotalProductsWithTaxes()
                         + $this->source->total_shipping_tax_incl
                         + $this->source->total_wrapping_tax_incl
                         - $this->source->total_discounts_tax_incl;
        } else {
            // On credit notes, the amount ex VAT will not have been corrected
            // for discounts that are subtracted from the refund. This will be
            // corrected later in getDiscountLinesCreditNote().
            $amount = $this->source->total_products_tax_excl
                      + $this->source->total_shipping_tax_excl;
            $amountInc = $this->source->total_products_tax_incl
                         + $this->source->total_shipping_tax_incl;
        }

        return array(
            Meta::InvoiceAmountInc => $sign * $amountInc,
            Meta::InvoiceAmount => $sign * $amount,
        );
    }
873322
public function toArray()
    {
        return [
            'order_tax_amount' => CurrencyUtils::amountToExponent($this->getOrderTaxAmount(), $this->currency),
            'items'            => array_map(
                function ($item) {
                    return ['item' => $item->toArray()];
                },
                $this->items
            )
        ];
    }
1038697
protected function _getEchoMethods()
    {
        $methods = [
            '_compileRawEchos' => strlen(stripcslashes($this->_rawTags[0])),
            '_compileEscapedEchos' => strlen(stripcslashes($this->_escapedTags[0])),
        ];

        uksort($methods, static function ($method1, $method2) use ($methods) {
            // Ensure the longest tags are processed first
            if ($methods[$method1] > $methods[$method2]) {
                return -1;
            }
            if ($methods[$method1] < $methods[$method2]) {
                return 1;
            }

            // Otherwise give preference to raw tags (assuming they've overridden)
            if ($method1 === '_compileRawEchos') {
                return -1;
            }
            if ($method2 === '_compileRawEchos') {
                return 1;
            }

            if ($method1 === '_compileEscapedEchos') {
                return -1;
            }
            if ($method2 === '_compileEscapedEchos') {
                return 1;
            }

            return 0;
        });

        return $methods;
    }
26360
protected function getComputedOptions()
    {
        $unassigned = $this->option('unassigned');
        $orphaned = $this->option('orphaned');

        if (! $unassigned && ! $orphaned) {
            $unassigned = $orphaned = true;
        }

        return [$unassigned, $orphaned];
    }
806042
public function getVatAmounts()
    {
        $amounts = [];

        foreach ($this->getOrderElements() as $orderElement) {
            $rate = $orderElement->getVatRate();
            $amount = (string) $orderElement->getVatAmount();

            if (isset($amounts[$rate])) {
                $amounts[$rate]['amount'] = bcadd($amounts[$rate]['amount'], $amount);
            } else {
                $amounts[$rate] = [
                    'rate' => $rate,
                    'amount' => $amount,
                ];
            }
        }

        return $amounts;
    }