getConfigDirectory()."/maker.json"), true); foreach ($config as $rule=>$info) { if (str_starts_with($rule, '@')) { $rule = substr($rule, 1); register_command(new class($rule) extends Command { private $rule; public function __construct($rule) { $this->rule = $rule; parent::__construct(); } protected function configure() { $this->setName("make:{$this->rule}"); $this->setDescription("Run the {$this->rule} maker task"); } protected function execute(InputInterface $input, OutputInterface $output) { } }); } } } } if (file_exists(get_environment()->getConfigDirectory()."/maker.json")) { register_plugin("com.noccy.maker", new MakerPlug()); }