1 | <?php |
||
21 | class DiscoveryPlugin implements PluginInterface, EventSubscriberInterface, Capable |
||
22 | { |
||
23 | /** |
||
24 | * @var Composer |
||
25 | */ |
||
26 | protected $composer; |
||
27 | protected $io; |
||
28 | |||
29 | /** |
||
30 | * Apply plugin modifications to Composer. |
||
31 | * |
||
32 | * @param Composer $composer |
||
33 | * @param IOInterface $io |
||
34 | */ |
||
35 | public function activate(Composer $composer, IOInterface $io) |
||
40 | |||
41 | public static function getSubscribedEvents() |
||
47 | |||
48 | public function beforeDumpAutoload(Event $event) |
||
60 | |||
61 | /** |
||
62 | * This registers the generated TheCodingMachine\Discovery class in the autoloader. |
||
63 | */ |
||
64 | private function registerClassInAutoloader() |
||
72 | |||
73 | /** |
||
74 | * Method by which a Plugin announces its API implementations, through an array |
||
75 | * with a special structure. |
||
76 | * |
||
77 | * The key must be a string, representing a fully qualified class/interface name |
||
78 | * which Composer Plugin API exposes. |
||
79 | * The value must be a string as well, representing the fully qualified class name |
||
80 | * of the implementing class. |
||
81 | * |
||
82 | * @tutorial |
||
83 | * |
||
84 | * return array( |
||
85 | * 'Composer\Plugin\Capability\CommandProvider' => 'My\CommandProvider', |
||
86 | * 'Composer\Plugin\Capability\Validator' => 'My\Validator', |
||
87 | * ); |
||
88 | * |
||
89 | * @return string[] |
||
90 | */ |
||
91 | public function getCapabilities() |
||
97 | } |
||
98 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.