Skip to content

Commit 9407f77

Browse files
authored
Merge pull request #330 from bowphp/refactor/code-base
refactor: reorder command
2 parents f171918 + d13ebec commit 9407f77

22 files changed

+111
-96
lines changed

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"yaml.schemas": {
3+
"file:///c%3A/Users/dakia/.vscode/extensions/atlassian.atlascode-3.0.2/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml",
4+
"https://www.artillery.io/schema.json": []
5+
}
6+
}

src/Console/Command.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@
1313
use Bow\Console\Command\AppEventCommand;
1414
use Bow\Console\Command\MigrationCommand;
1515
use Bow\Console\Command\ValidationCommand;
16-
use Bow\Console\Command\GenerateKeyCommand;
17-
use Bow\Console\Command\GenerateCacheCommand;
18-
use Bow\Console\Command\GenerateModelCommand;
19-
use Bow\Console\Command\GenerateQueueCommand;
20-
use Bow\Console\Command\GenerateSeederCommand;
21-
use Bow\Console\Command\GenerateConsoleCommand;
22-
use Bow\Console\Command\GenerateServiceCommand;
23-
use Bow\Console\Command\GenerateSessionCommand;
24-
use Bow\Console\Command\GenerateProducerCommand;
25-
use Bow\Console\Command\GenerateExceptionCommand;
26-
use Bow\Console\Command\GenerateMessagingCommand;
27-
use Bow\Console\Command\GenerateControllerCommand;
28-
use Bow\Console\Command\GenerateMiddlewareCommand;
29-
use Bow\Console\Command\GenerateNotificationCommand;
30-
use Bow\Console\Command\GenerateConfigurationCommand;
31-
use Bow\Console\Command\GenerateEventListenerCommand;
32-
use Bow\Console\Command\GenerateResourceControllerCommand;
16+
use Bow\Console\Command\Generator\GenerateKeyCommand;
17+
use Bow\Console\Command\Generator\GenerateCacheCommand;
18+
use Bow\Console\Command\Generator\GenerateModelCommand;
19+
use Bow\Console\Command\Generator\GenerateQueueCommand;
20+
use Bow\Console\Command\Generator\GenerateSeederCommand;
21+
use Bow\Console\Command\Generator\GenerateConsoleCommand;
22+
use Bow\Console\Command\Generator\GenerateServiceCommand;
23+
use Bow\Console\Command\Generator\GenerateSessionCommand;
24+
use Bow\Console\Command\Generator\GenerateProducerCommand;
25+
use Bow\Console\Command\Generator\GenerateExceptionCommand;
26+
use Bow\Console\Command\Generator\GenerateMessagingCommand;
27+
use Bow\Console\Command\Generator\GenerateControllerCommand;
28+
use Bow\Console\Command\Generator\GenerateMiddlewareCommand;
29+
use Bow\Console\Command\Generator\GenerateNotificationCommand;
30+
use Bow\Console\Command\Generator\GenerateConfigurationCommand;
31+
use Bow\Console\Command\Generator\GenerateEventListenerCommand;
32+
use Bow\Console\Command\Generator\GenerateRouterResourceCommand;
3333

3434
class Command extends AbstractCommand
3535
{
@@ -66,7 +66,7 @@ class Command extends AbstractCommand
6666
"run:worker" => WorkerCommand::class,
6767
"flush:worker" => WorkerCommand::class,
6868
"generate:key" => GenerateKeyCommand::class,
69-
"generate:resource" => GenerateResourceControllerCommand::class,
69+
"generate:resource" => GenerateRouterResourceCommand::class,
7070
"generate:session-table" => GenerateSessionCommand::class,
7171
"generate:queue-table" => GenerateQueueCommand::class,
7272
"generate:cache-table" => GenerateCacheCommand::class,
@@ -100,7 +100,7 @@ public function call(string $command, string $action, ...$rest): mixed
100100
$this->throwFailsCommand("The command $command not found !");
101101
}
102102

103-
if (!preg_match('/^(migrate|migration)/', $command)) {
103+
if (!preg_match('/^(migration)/', $command)) {
104104
$method = "run";
105105
} else {
106106
$method = $action;

src/Console/Command/GenerateCacheCommand.php renamed to src/Console/Command/Generator/GenerateCacheCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Bow\Console\Command;
5+
namespace Bow\Console\Command\Generator;
66

77
use Bow\Console\AbstractCommand;
88
use Bow\Console\Color;

src/Console/Command/GenerateConfigurationCommand.php renamed to src/Console/Command/Generator/GenerateConfigurationCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Bow\Console\Command;
5+
namespace Bow\Console\Command\Generator;
66

77
use Bow\Console\AbstractCommand;
88
use Bow\Console\Color;

src/Console/Command/GenerateConsoleCommand.php renamed to src/Console/Command/Generator/GenerateConsoleCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Bow\Console\Command;
5+
namespace Bow\Console\Command\Generator;
66

77
use Bow\Console\AbstractCommand;
88
use Bow\Console\Generator;

src/Console/Command/GenerateControllerCommand.php renamed to src/Console/Command/Generator/GenerateControllerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Bow\Console\Command;
5+
namespace Bow\Console\Command\Generator;
66

77
use Bow\Console\AbstractCommand;
88
use Bow\Console\Generator;

src/Console/Command/GenerateEventListenerCommand.php renamed to src/Console/Command/Generator/GenerateEventListenerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Bow\Console\Command;
5+
namespace Bow\Console\Command\Generator;
66

77
use Bow\Console\AbstractCommand;
88
use Bow\Console\Generator;

src/Console/Command/GenerateExceptionCommand.php renamed to src/Console/Command/Generator/GenerateExceptionCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Bow\Console\Command;
5+
namespace Bow\Console\Command\Generator;
66

77
use Bow\Console\AbstractCommand;
88
use Bow\Console\Generator;

src/Console/Command/GenerateKeyCommand.php renamed to src/Console/Command/Generator/GenerateKeyCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Bow\Console\Command;
5+
namespace Bow\Console\Command\Generator;
66

77
use Bow\Console\AbstractCommand;
88
use Bow\Console\Color;

src/Console/Command/GenerateMessagingCommand.php renamed to src/Console/Command/Generator/GenerateMessagingCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Bow\Console\Command;
5+
namespace Bow\Console\Command\Generator;
66

77
use Bow\Console\AbstractCommand;
88
use Bow\Console\Color;

0 commit comments

Comments
 (0)