Passed
Push — master ( 140288...c9bbee )
by Nils
03:13
created
src/Util/WebsiteUtil.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@
 block discarded – undo
19 19
     {
20 20
         if (!array_key_exists($key, $inventory)
21 21
             || !is_array($inventory[$key])
22
-        ) return [];
22
+        ) {
23
+            return [];
24
+        }
23 25
 
24 26
         $configs = $inventory[$key];
25 27
 
Please login to merge, or discard this patch.
src/Collector/Website/WordPress/WordPressCollector.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,7 +61,9 @@  discard block
 block discarded – undo
61 61
         $file = File::getInstance();
62 62
 
63 63
         $pluginDir = $documentRoot . 'wp-content/plugins';
64
-        if (!$file->isDir($pluginDir)) return [];
64
+        if (!$file->isDir($pluginDir)) {
65
+            return [];
66
+        }
65 67
 
66 68
         $plugins = array_diff($file->scanDir($pluginDir), ['.', '..']);
67 69
         $pluginArray = [];
@@ -69,7 +71,9 @@  discard block
 block discarded – undo
69 71
         foreach ($plugins as $pluginFolder) {
70 72
             $path = $pluginDir . '/' . $pluginFolder;
71 73
 
72
-            if (!$file->isDir($path)) continue;
74
+            if (!$file->isDir($path)) {
75
+                continue;
76
+            }
73 77
 
74 78
             $entries = array_diff($file->scanDir($path), ['.', '..']);
75 79
 
@@ -125,7 +129,9 @@  discard block
 block discarded – undo
125 129
             if (isset($urlParts['path'])) {
126 130
                 $segments = explode('/', trim($urlParts['path'], '/'));
127 131
                 $lastSegment = end($segments);
128
-                if ($lastSegment) return $lastSegment;
132
+                if ($lastSegment) {
133
+                    return $lastSegment;
134
+                }
129 135
             }
130 136
         }
131 137
 
@@ -137,10 +143,14 @@  discard block
 block discarded – undo
137 143
     {
138 144
         $url = "https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&request[slug]=" . urlencode($slug);
139 145
         $response = @file_get_contents($url);
140
-        if (!$response) return null;
146
+        if (!$response) {
147
+            return null;
148
+        }
141 149
 
142 150
         $pluginData = json_decode($response, true);
143
-        if (!isset($pluginData['version'])) return null;
151
+        if (!isset($pluginData['version'])) {
152
+            return null;
153
+        }
144 154
 
145 155
         $latestVersion = $pluginData['version'];
146 156
 
Please login to merge, or discard this patch.
src/Command/CollectCommand.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,9 @@
 block discarded – undo
46 46
                     $collector->setClient($client);
47 47
                 }
48 48
 
49
-                if ($debugMode) $start = time();
49
+                if ($debugMode) {
50
+                    $start = time();
51
+                }
50 52
 
51 53
                 $collected = $collector->collect();
52 54
                 if ($collected) {
Please login to merge, or discard this patch.