Passed
Pull Request — master (#11)
by Stefano
09:45 queued 54s
created
src/Command/ChangeLogCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function initialize(): void
88 88
     {
89
-        $config = (array)Configure::read('ChangeLog');
89
+        $config = (array) Configure::read('ChangeLog');
90 90
         $this->setConfig($config);
91 91
     }
92 92
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         $io->out("Reading closed PRs from from $from");
104 104
 
105 105
         $json = $this->fetchPrs($from);
106
-        $items = (array)Hash::get($json, 'items');
106
+        $items = (array) Hash::get($json, 'items');
107 107
         $io->out(sprintf('Loaded %d prs', count($items)));
108 108
 
109 109
         $changeLog = $this->createChangeLog($items);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $url = $this->getConfig('url');
133 133
         $response = $client->get($url, $query, compact('headers'));
134 134
 
135
-        return (array)$response->getJson();
135
+        return (array) $response->getJson();
136 136
     }
137 137
 
138 138
     /**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     {
146 146
         $res = [];
147 147
         foreach ($items as $item) {
148
-            $milestone = (string)Hash::get($item, 'milestone.title');
148
+            $milestone = (string) Hash::get($item, 'milestone.title');
149 149
             if (substr($milestone, 0, 1) !== '4') {
150 150
                 continue;
151 151
             }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      */
166 166
     protected function classify(array $labels): string
167 167
     {
168
-        foreach ((array)$this->getConfig('filter') as $name => $data) {
168
+        foreach ((array) $this->getConfig('filter') as $name => $data) {
169 169
             if (!empty(array_intersect($labels, $data))) {
170 170
                 return $name;
171 171
             }
@@ -185,9 +185,9 @@  discard block
 block discarded – undo
185 185
     {
186 186
         $out = sprintf("## Version %s - Cactus\n", $version);
187 187
 
188
-        foreach ((array)$this->getConfig('sections') as $name => $label) {
188
+        foreach ((array) $this->getConfig('sections') as $name => $label) {
189 189
             $out .= sprintf("\n### %s changes (%s)\n\n", $label, $version);
190
-            $out .= $this->loglines((array)Hash::get($changeLog, $name));
190
+            $out .= $this->loglines((array) Hash::get($changeLog, $name));
191 191
         }
192 192
 
193 193
         file_put_contents(sprintf('changelog-%s.md', $version), $out);
Please login to merge, or discard this patch.