1 | <?php |
||
20 | class DiscoveryPlugin implements PluginInterface, EventSubscriberInterface, Capable |
||
21 | { |
||
22 | /** |
||
23 | * @var Composer |
||
24 | */ |
||
25 | protected $composer; |
||
26 | protected $io; |
||
27 | |||
28 | /** |
||
29 | * Apply plugin modifications to Composer. |
||
30 | * |
||
31 | * @param Composer $composer |
||
32 | * @param IOInterface $io |
||
33 | */ |
||
34 | public function activate(Composer $composer, IOInterface $io) |
||
39 | |||
40 | public static function getSubscribedEvents() |
||
46 | |||
47 | /** |
||
48 | * @return AssetsBuilder |
||
49 | */ |
||
50 | private function getAssetsBuilder() : AssetsBuilder |
||
56 | |||
57 | public function beforeDumpAutoload(Event $event) |
||
90 | |||
91 | /** |
||
92 | * This registers the generated TheCodingMachine\Discovery class in the autoloader. |
||
93 | */ |
||
94 | private function registerClassInAutoloader() |
||
102 | |||
103 | /** |
||
104 | * Method by which a Plugin announces its API implementations, through an array |
||
105 | * with a special structure. |
||
106 | * |
||
107 | * The key must be a string, representing a fully qualified class/interface name |
||
108 | * which Composer Plugin API exposes. |
||
109 | * The value must be a string as well, representing the fully qualified class name |
||
110 | * of the implementing class. |
||
111 | * |
||
112 | * @tutorial |
||
113 | * |
||
114 | * return array( |
||
115 | * 'Composer\Plugin\Capability\CommandProvider' => 'My\CommandProvider', |
||
116 | * 'Composer\Plugin\Capability\Validator' => 'My\Validator', |
||
117 | * ); |
||
118 | * |
||
119 | * @return string[] |
||
120 | */ |
||
121 | public function getCapabilities() |
||
127 | } |
||
128 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.