-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDevToolsCommandProvider.php
More file actions
63 lines (58 loc) · 2.15 KB
/
DevToolsCommandProvider.php
File metadata and controls
63 lines (58 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
declare(strict_types=1);
/**
* This file is part of fast-forward/dev-tools.
*
* This source file is subject to the license bundled
* with this source code in the file LICENSE.
*
* @copyright Copyright (c) 2026 Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
* @license https://opensource.org/licenses/MIT MIT License
*
* @see https://github.com/php-fast-forward/dev-tools
* @see https://github.com/php-fast-forward
* @see https://datatracker.ietf.org/doc/html/rfc2119
*/
namespace FastForward\DevTools\Composer\Capability;
use FastForward\DevTools\Command\AbstractCommand;
use Composer\Plugin\Capability\CommandProvider as CommandProviderCapability;
use FastForward\DevTools\Command\CodeStyleCommand;
use FastForward\DevTools\Command\DocsCommand;
use FastForward\DevTools\Command\GitIgnoreCommand;
use FastForward\DevTools\Command\PhpDocCommand;
use FastForward\DevTools\Command\RefactorCommand;
use FastForward\DevTools\Command\ReportsCommand;
use FastForward\DevTools\Command\StandardsCommand;
use FastForward\DevTools\Command\TestsCommand;
use FastForward\DevTools\Command\WikiCommand;
use FastForward\DevTools\Command\SyncCommand;
/**
* Provides a registry of custom dev-tools commands mapped for Composer integration.
* This capability struct MUST implement the defined `CommandProviderCapability`.
*/
final class DevToolsCommandProvider implements CommandProviderCapability
{
/**
* Dispatches the comprehensive collection of CLI commands.
*
* The method MUST yield an array of instantiated command classes representing the tools.
* It SHALL be queried by the Composer plugin dynamically during runtime execution.
*
* @return array<int, AbstractCommand> the commands defined within the toolset
*/
public function getCommands()
{
return [
new CodeStyleCommand(),
new RefactorCommand(),
new TestsCommand(),
new PhpDocCommand(),
new DocsCommand(),
new StandardsCommand(),
new ReportsCommand(),
new WikiCommand(),
new SyncCommand(),
new GitIgnoreCommand(),
];
}
}