refactor: susun semula struktur folder — Laravel source ke src/

This commit is contained in:
Saufi
2026-05-19 15:58:35 +08:00
parent f052251b94
commit bf53c71b45
10806 changed files with 1385379 additions and 121 deletions

View File

@@ -0,0 +1,46 @@
<?php
declare(strict_types=1);
namespace Laravel\Pao\Laravel;
use Illuminate\Console\Events\CommandStarting;
use Illuminate\Console\OutputStyle;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
use Laravel\AgentDetector\AgentDetector;
/**
* @internal
*
* @codeCoverageIgnore
*/
final class ServiceProvider extends LaravelServiceProvider
{
public function boot(): void
{
if (isset($_SERVER['PAO_DISABLE'])) {
return;
}
if (! $this->app->runningInConsole()) {
return;
}
if ($this->app->runningUnitTests()) {
return;
}
if (! AgentDetector::detect()->isAgent) {
return;
}
$this->app->bind(OutputStyle::class, PaoOutputStyle::class);
/** @var Dispatcher $events */
$events = $this->app->make(Dispatcher::class);
$events->listen(CommandStarting::class, function (CommandStarting $event): void {
$event->output->setDecorated(false);
});
}
}