You've already forked Php-Template
All checks were successful
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 2m37s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 2m35s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 2m52s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 2m43s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 2m45s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 2m19s
47 lines
1.7 KiB
PHP
47 lines
1.7 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Siteworxpro\App\Cli;
|
|
|
|
use Ahc\Cli\Application;
|
|
use Siteworxpro\App\Cli\Commands\DemoCommand;
|
|
use Siteworxpro\App\Cli\Commands\Queue\Start;
|
|
use Siteworxpro\App\Cli\Commands\Queue\TestJob;
|
|
use Siteworxpro\App\Helpers\Version;
|
|
use Siteworxpro\App\Kernel;
|
|
use Siteworxpro\App\Services\Facades\Config;
|
|
|
|
class App
|
|
{
|
|
private Application $app;
|
|
|
|
/**
|
|
* @throws \ReflectionException
|
|
*/
|
|
public function __construct()
|
|
{
|
|
Kernel::boot();
|
|
$this->app = new Application('Php-Template', Version::VERSION);
|
|
|
|
$this->app->add(new DemoCommand());
|
|
$this->app->add(new Start());
|
|
$this->app->add(new TestJob());
|
|
}
|
|
|
|
public function run(): int
|
|
{
|
|
$this->app->logo(
|
|
<<<EOF
|
|
▄▄▄▄▄ ▄ ▄ ▄▄▄▄▄ ▄▄▄▄▄▄▄ ▀▀█ ▄
|
|
█ ▀█ █ █ █ ▀█ █ ▄▄▄ ▄▄▄▄▄ ▄▄▄▄ █ ▄▄▄ ▄▄█▄▄ ▄▄▄
|
|
█▄▄▄█▀ █▄▄▄▄█ █▄▄▄█▀ █ █▀ █ █ █ █ █▀ ▀█ █ ▀ █ █ █▀ █
|
|
█ █ █ █ ▀▀▀ █ █▀▀▀▀ █ █ █ █ █ █ ▄▀▀▀█ █ █▀▀▀▀
|
|
█ █ █ █ █ ▀█▄▄▀ █ █ █ ██▄█▀ ▀▄▄ ▀▄▄▀█ ▀▄▄ ▀█▄▄▀
|
|
█
|
|
EOF
|
|
);
|
|
return $this->app->handle($_SERVER['argv']);
|
|
}
|
|
}
|