Completed
Pull Request — master (#5)
by David
02:10
created
src/DiscoveryPlugin.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 use Composer\EventDispatcher\EventSubscriberInterface;
9 9
 use Composer\Factory;
10 10
 use Composer\IO\IOInterface;
11
-use Composer\Package\PackageInterface;
12 11
 use Composer\Plugin\Capability\CommandProvider;
13 12
 use Composer\Plugin\Capable;
14 13
 use Composer\Plugin\PluginInterface;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace TheCodingMachine\Discovery;
6 6
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $assetTypes = $this->getAssetsBuilder()->findAssetTypes($localRepos);
68 68
 
69 69
         // Let's get an array of values, indexed by asset type (to store in the discovery_values.php file)
70
-        $values = array_map(function (AssetType $assetType) {
70
+        $values = array_map(function(AssetType $assetType) {
71 71
             return $assetType->getValues();
72 72
         }, $assetTypes);
73 73
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 return '.var_export($values, true).";\n");
76 76
 
77 77
         // Let's get an array of assetTypes, indexed by asset type (to store in the discovery_asset_types.php file)
78
-        $assetTypes = array_map(function (AssetType $assetType) {
78
+        $assetTypes = array_map(function(AssetType $assetType) {
79 79
             return $assetType->jsonSerialize();
80 80
         }, $assetTypes);
81 81
 
Please login to merge, or discard this patch.
src/AssetsBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 
50 50
         $orderedPackageList = PackagesOrderer::reorderPackages($unorderedPackagesList);
51 51
 
52
-        $packages = array_filter($orderedPackageList, function (PackageInterface $package) {
52
+        $packages = array_filter($orderedPackageList, function(PackageInterface $package) {
53 53
             $installationManager = $this->installationManager;
54 54
 
55 55
             $packageInstallPath = $installationManager->getInstallPath($package);
Please login to merge, or discard this patch.
src/Commands/ListAssetTypesCommand.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@
 block discarded – undo
18 18
     protected function configure()
19 19
     {
20 20
         $this->setName('discovery:list')
21
-             ->setDescription('List the values of the asset type passed in parameter (or list all asset types if no parameter is passed)')
22
-             ->addArgument('asset-type', InputArgument::OPTIONAL, 'The asset type to list')
23
-             ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt or json)', 'txt');
21
+                ->setDescription('List the values of the asset type passed in parameter (or list all asset types if no parameter is passed)')
22
+                ->addArgument('asset-type', InputArgument::OPTIONAL, 'The asset type to list')
23
+                ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format (txt or json)', 'txt');
24 24
     }
25 25
 
26 26
     protected function execute(InputInterface $input, OutputInterface $output)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
                 $output->writeln(sprintf('<error>Could not find the "%s" asset type.</error>', $assetTypeName));
34 34
                 return;
35 35
             }
36
-            $assetTypes = [ $assetTypes[$assetTypeName] ];
36
+            $assetTypes = [$assetTypes[$assetTypeName]];
37 37
         }
38 38
 
39 39
         switch ($input->getOption('format')) {
Please login to merge, or discard this patch.