Completed
Push — master ( 3e3e7d...a534d6 )
by David
11:20
created
src/AssetOperation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Commands/RemoveAssetCommand.php 2 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -4,15 +4,11 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
src/AssetsBuilder.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,6 @@
 block discarded – undo
42 42
      * Find discovery.json files in the passed repository and builds an asset type.
43 43
      *
44 44
      * @param RepositoryInterface $repository
45
-     * @param RootPackageInterface $rootPackage
46 45
      * @return array|AssetType[]
47 46
      */
48 47
     public function findAssetTypes(RepositoryInterface $repository) : array
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 
52 52
         $orderedPackageList = PackagesOrderer::reorderPackages($unorderedPackagesList);
53 53
 
54
-        $packages = array_filter($orderedPackageList, function (PackageInterface $package) {
54
+        $packages = array_filter($orderedPackageList, function(PackageInterface $package) {
55 55
             $packageInstallPath = $this->getInstallPath($package);
56 56
 
57 57
             return file_exists($packageInstallPath.'/discovery.json');
Please login to merge, or discard this patch.
src/Dumper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $assetTypes = $this->getAssetsBuilder()->findAssetTypes($compositeRepos);
44 44
 
45 45
         // Let's get an array of values, indexed by asset type (to store in the discovery_values.php file)
46
-        $values = array_map(function (AssetType $assetType) {
46
+        $values = array_map(function(AssetType $assetType) {
47 47
             return $assetType->getValues();
48 48
         }, $assetTypes);
49 49
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 return '.var_export($values, true).";\n");
52 52
 
53 53
         // Let's get an array of assetTypes, indexed by asset type (to store in the discovery_asset_types.php file)
54
-        $assetTypes = array_map(function (AssetType $assetType) {
54
+        $assetTypes = array_map(function(AssetType $assetType) {
55 55
             return $assetType->jsonSerialize();
56 56
         }, $assetTypes);
57 57
 
Please login to merge, or discard this patch.