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,58 @@
<?php
declare(strict_types=1);
namespace NunoMaduro\Collision;
use Symfony\Component\Console\Output\OutputInterface;
use Tests\Unit\HandlerTest;
use Whoops\Handler\Handler as AbstractHandler;
/**
* @internal
*
* @see HandlerTest
*/
final class Handler extends AbstractHandler
{
/**
* Holds an instance of the writer.
*/
private Writer $writer;
/**
* Creates an instance of the Handler.
*/
public function __construct(?Writer $writer = null)
{
$this->writer = $writer ?: new Writer;
}
/**
* {@inheritdoc}
*/
public function handle(): int
{
$this->writer->write($this->getInspector()); // @phpstan-ignore-line
return self::QUIT;
}
/**
* {@inheritdoc}
*/
public function setOutput(OutputInterface $output): self
{
$this->writer->setOutput($output);
return $this;
}
/**
* {@inheritdoc}
*/
public function getWriter(): Writer
{
return $this->writer;
}
}