1 | <?php |
||
17 | class Plugin implements |
||
18 | CPlugin\PluginInterface, |
||
19 | EventDispatcher\EventSubscriberInterface |
||
20 | { |
||
21 | /** @var IO\IOInterface */ |
||
22 | private $io; |
||
23 | |||
24 | /** @var Composer\Config */ |
||
25 | private $config; |
||
26 | |||
27 | /** @var Config */ |
||
28 | private $pluginConfig; |
||
29 | |||
30 | /** @var boolean */ |
||
31 | private $disabled = false; |
||
32 | |||
33 | private static $pluginClasses = array( |
||
34 | 'Aspects\AspectAuth', |
||
35 | 'Aspects\AspectProxy', |
||
36 | 'Aspects\AspectRedirect', |
||
37 | 'Aspects\GitHubRequest', |
||
38 | 'Aspects\GitLabRequest', |
||
39 | 'Aspects\HttpGetRequest', |
||
40 | 'Aspects\HttpGetResponse', |
||
41 | 'Aspects\JoinPoint', |
||
42 | 'Config', |
||
43 | 'CurlRemoteFilesystem', |
||
44 | 'Factory', |
||
45 | 'OutputFile', |
||
46 | 'ParallelDownloader', |
||
47 | 'Plugin', |
||
48 | ); |
||
49 | |||
50 | 3 | public function activate(Composer $composer, IO\IOInterface $io) |
|
51 | { |
||
52 | // @codeCoverageIgnoreStart |
||
53 | // guard for self-update problem |
||
54 | if (__CLASS__ !== 'Hirak\Prestissimo\Plugin') { |
||
55 | return $this->disable(); |
||
56 | } |
||
57 | // @codeCoverageIgnoreEnd |
||
58 | |||
59 | // load all classes |
||
60 | 3 | foreach (self::$pluginClasses as $class) { |
|
61 | 3 | class_exists(__NAMESPACE__ . '\\' . $class); |
|
62 | 3 | } |
|
63 | |||
64 | 3 | $this->config = $composer->getConfig(); |
|
|
|||
65 | 3 | $this->io = $io; |
|
66 | 3 | $this->pluginConfig = $this->setPluginConfig(); |
|
67 | 3 | } |
|
68 | |||
69 | 1 | public static function getSubscribedEvents() |
|
80 | |||
81 | 1 | public function onPreFileDownload(CPlugin\PreFileDownloadEvent $ev) |
|
99 | |||
100 | /** |
||
101 | * pre-fetch parallel by curl_multi |
||
102 | */ |
||
103 | 1 | public function onPostDependenciesSolving(Installer\InstallerEvent $ev) |
|
116 | |||
117 | /** |
||
118 | * @param DependencyResolver\Operation\OperationInterface[] |
||
119 | * @return Package\PackageInterface[] |
||
120 | */ |
||
121 | 1 | private static function filterPackages(array $operations) |
|
138 | |||
139 | 3 | private function setPluginConfig() |
|
147 | |||
148 | 2 | public function disable() |
|
152 | |||
153 | 1 | public function isDisabled() |
|
157 | } |
||
158 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..