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,39 @@
<?php
namespace Laravel\Roster\Console;
use Illuminate\Console\Command;
use Laravel\Roster\Roster;
class ScanCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'roster:scan {directory}';
protected $description = 'Detect packages & approaches in use and output as JSON';
public function handle(): int
{
$directory = $this->argument('directory');
if (! is_string($directory)) {
$this->error('Pass a directory');
return self::FAILURE;
}
if (! is_dir($directory) || ! is_readable($directory)) {
$this->error("Directory '{$directory}' isn't a directory");
return self::FAILURE;
}
$roster = Roster::scan($directory);
$this->line($roster->json());
return self::SUCCESS;
}
}