@@ -6,17 +6,13 @@ |
||
6 | 6 | |
7 | 7 | use Composer\Composer; |
8 | 8 | use Composer\EventDispatcher\EventSubscriberInterface; |
9 | -use Composer\Factory; |
|
10 | 9 | use Composer\IO\IOInterface; |
11 | -use Composer\Package\PackageInterface; |
|
12 | 10 | use Composer\Plugin\Capability\CommandProvider; |
13 | 11 | use Composer\Plugin\Capable; |
14 | 12 | use Composer\Plugin\PluginInterface; |
15 | 13 | use Composer\Script\Event; |
16 | 14 | use Composer\Script\ScriptEvents; |
17 | -use Symfony\Component\Filesystem\Filesystem; |
|
18 | 15 | use TheCodingMachine\Discovery\Commands\CommandProvider as DiscoveryCommandProvider; |
19 | -use TheCodingMachine\Discovery\Commands\DumpCommand; |
|
20 | 16 | |
21 | 17 | class DiscoveryPlugin implements PluginInterface, EventSubscriberInterface, Capable |
22 | 18 | { |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace TheCodingMachine\Discovery; |
5 | 5 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $assetTypes = $this->getAssetsBuilder()->findAssetTypes($localRepos); |
37 | 37 | |
38 | 38 | // Let's get an array of values, indexed by asset type (to store in the discovery_values.php file) |
39 | - $values = array_map(function (AssetType $assetType) { |
|
39 | + $values = array_map(function(AssetType $assetType) { |
|
40 | 40 | return $assetType->getValues(); |
41 | 41 | }, $assetTypes); |
42 | 42 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | return '.var_export($values, true).";\n"); |
45 | 45 | |
46 | 46 | // Let's get an array of assetTypes, indexed by asset type (to store in the discovery_asset_types.php file) |
47 | - $assetTypes = array_map(function (AssetType $assetType) { |
|
47 | + $assetTypes = array_map(function(AssetType $assetType) { |
|
48 | 48 | return $assetType->jsonSerialize(); |
49 | 49 | }, $assetTypes); |
50 | 50 |
@@ -112,7 +112,7 @@ |
||
112 | 112 | $simple = $this->asset->toSimpleArray(); |
113 | 113 | if ($this->operation === self::REMOVE) { |
114 | 114 | if (is_string($simple)) { |
115 | - $simple = [ 'value' => $simple ]; |
|
115 | + $simple = ['value' => $simple]; |
|
116 | 116 | } |
117 | 117 | $simple['action'] = self::REMOVE; |
118 | 118 | } |
@@ -4,15 +4,11 @@ |
||
4 | 4 | namespace TheCodingMachine\Discovery\Commands; |
5 | 5 | |
6 | 6 | |
7 | -use Composer\Command\BaseCommand; |
|
8 | -use Composer\Factory; |
|
9 | 7 | use Symfony\Component\Console\Input\InputArgument; |
10 | 8 | use Symfony\Component\Console\Input\InputInterface; |
11 | -use Symfony\Component\Console\Input\InputOption; |
|
12 | 9 | use Symfony\Component\Console\Output\OutputInterface; |
13 | 10 | use TheCodingMachine\Discovery\Asset; |
14 | 11 | use TheCodingMachine\Discovery\AssetOperation; |
15 | -use TheCodingMachine\Discovery\AssetsBuilder; |
|
16 | 12 | use TheCodingMachine\Discovery\AssetType; |
17 | 13 | use TheCodingMachine\Discovery\DiscoveryFileLoader; |
18 | 14 | use TheCodingMachine\Discovery\Dumper; |
@@ -22,9 +22,9 @@ |
||
22 | 22 | protected function configure() |
23 | 23 | { |
24 | 24 | $this->setName('discovery:remove') |
25 | - ->setDescription('Remove an asset') |
|
26 | - ->addArgument('asset-type', InputArgument::REQUIRED, 'The asset type') |
|
27 | - ->addArgument('value', InputArgument::REQUIRED, 'The asset to remove'); |
|
25 | + ->setDescription('Remove an asset') |
|
26 | + ->addArgument('asset-type', InputArgument::REQUIRED, 'The asset type') |
|
27 | + ->addArgument('value', InputArgument::REQUIRED, 'The asset to remove'); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | protected function execute(InputInterface $input, OutputInterface $output) |