@@ -55,12 +55,12 @@ discard block |
||
55 | 55 | 'json', |
56 | 56 | function(VisitorInterface $visitor, Collection $collection, array $type, Context $context) { |
57 | 57 | $output = []; |
58 | - foreach($collection->values() as $package) { |
|
58 | + foreach ($collection->values() as $package) { |
|
59 | 59 | /** @var Package $package */ |
60 | 60 | |
61 | 61 | $output[$package->getName()] = $package->getVersion(); |
62 | 62 | } |
63 | - if(!$output){ |
|
63 | + if (!$output) { |
|
64 | 64 | return null; |
65 | 65 | } |
66 | 66 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $repositories = $visitor->visitArray($data, $type, $context); |
81 | 81 | |
82 | 82 | $collection = new RepositoryCollection(); |
83 | - foreach($repositories as $repository) { |
|
83 | + foreach ($repositories as $repository) { |
|
84 | 84 | $collection->put($repository->getId(), $repository); |
85 | 85 | } |
86 | 86 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | 'json', |
95 | 95 | function(VisitorInterface $visitor, array $data, array $type, Context $context) { |
96 | 96 | $temp = []; |
97 | - foreach($data as $name => $version) { |
|
97 | + foreach ($data as $name => $version) { |
|
98 | 98 | $temp[] = ['name' => $name, 'version' => $version]; |
99 | 99 | } |
100 | 100 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $packages = $visitor->visitArray($temp, $type, $context); |
103 | 103 | |
104 | 104 | $collection = new PackageCollection(); |
105 | - foreach($packages as $package) { |
|
105 | + foreach ($packages as $package) { |
|
106 | 106 | $collection->put($package->getId(), $package); |
107 | 107 | } |
108 | 108 |