1 | <?php |
||
20 | final class VersionsCheckPlugin implements PluginInterface, EventSubscriberInterface |
||
21 | { |
||
22 | const COMPOSER_MIN_VERSION = '1.0.0-stable'; |
||
23 | |||
24 | /** |
||
25 | * @var Composer |
||
26 | */ |
||
27 | private $composer; |
||
28 | |||
29 | /** |
||
30 | * @var IOInterface |
||
31 | */ |
||
32 | private $io; |
||
33 | |||
34 | /** |
||
35 | * @var VersionsCheck |
||
36 | */ |
||
37 | private $versionsCheck; |
||
38 | |||
39 | /** |
||
40 | * @var bool |
||
41 | */ |
||
42 | private $preferLowest; |
||
43 | |||
44 | /** |
||
45 | * @var array |
||
46 | */ |
||
47 | private $options = array(); |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | public function activate(Composer $composer, IOInterface $io) |
||
72 | |||
73 | /** |
||
74 | * {@inheritdoc} |
||
75 | */ |
||
76 | public static function getSubscribedEvents() |
||
92 | |||
93 | /** |
||
94 | * @return bool |
||
95 | */ |
||
96 | public static function satisfiesComposerVersion() |
||
105 | |||
106 | /** |
||
107 | * @param CommandEvent $event |
||
108 | */ |
||
109 | public function command(CommandEvent $event) |
||
114 | |||
115 | /** |
||
116 | * @param Event $event |
||
117 | */ |
||
118 | public function postUpdate(Event $event) |
||
126 | |||
127 | /** |
||
128 | * Tries to get plugin options and resolves them. |
||
129 | * |
||
130 | * @return array |
||
131 | */ |
||
132 | private function resolveOptions() |
||
151 | |||
152 | /** |
||
153 | * @param RepositoryManager $repositoryManager |
||
154 | * @param RootPackageInterface $rootPackage |
||
155 | */ |
||
156 | private function checkVersions(RepositoryManager $repositoryManager, RootPackageInterface $rootPackage) |
||
168 | } |
||
169 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.