From 76fa1a3ec4f007b115147ab62f073c1fdc4e79f4 Mon Sep 17 00:00:00 2001 From: Brandon Clothier Date: Fri, 27 Oct 2023 01:45:04 -0400 Subject: [PATCH] Autoload helper file, update TODO.md, add class docs --- TODO.md | 1 + composer.json | 5 ++++- src/Commands/MakeFossabotCommand.php | 6 ++++++ src/FossabotCommanderServiceProvider.php | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index cd63676..997164a 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,6 @@ # brandon14/fossabot-commander-laravel TODO +- Write tests. - Fix Psalm configs. - Fix CI workflow. - Get docs built using doctum and publish on Github. diff --git a/composer.json b/composer.json index 0406320..9dcafe7 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,10 @@ "autoload": { "psr-4": { "Brandon14\\FossabotCommanderLaravel\\": "src/" - } + }, + "files": [ + "src/helpers.php" + ] }, "autoload-dev": { "psr-4": { diff --git a/src/Commands/MakeFossabotCommand.php b/src/Commands/MakeFossabotCommand.php index 285edfd..86200dc 100644 --- a/src/Commands/MakeFossabotCommand.php +++ b/src/Commands/MakeFossabotCommand.php @@ -34,6 +34,11 @@ use Illuminate\Console\GeneratorCommand; use Illuminate\Console\Concerns\CreatesMatchingTest; +/** + * Command to generate {@link \Brandon14\FossabotCommander\Contracts\FossabotCommand} instances. + * + * @author Brandon Clothier + */ final class MakeFossabotCommand extends GeneratorCommand { use CreatesMatchingTest; @@ -72,6 +77,7 @@ protected function getStub() $published = resource_path('stubs/vendor/fossabot-commander').'/fossabot-command.stub'; $included = __DIR__.'/../../resources/stubs/fossabot-command.stub'; + // Use overridden stub if present. if ($this->files->exists($published)) { return $published; } diff --git a/src/FossabotCommanderServiceProvider.php b/src/FossabotCommanderServiceProvider.php index 0273ec1..eeedf5e 100644 --- a/src/FossabotCommanderServiceProvider.php +++ b/src/FossabotCommanderServiceProvider.php @@ -42,6 +42,11 @@ use Brandon14\FossabotCommanderLaravel\Commands\MakeFossabotCommand; use Brandon14\FossabotCommander\Contracts\FossabotCommander as FossabotCommanderInterface; +/** + * Registers FossabotCommander services and commands with Laravel's container. + * + * @author Brandon Clothier + */ final class FossabotCommanderServiceProvider extends ServiceProvider { /**