Passed
Push — main ( 2aae08...6e0791 )
by YeBeKhe
02:45 queued 41s
created
modules/singbox.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@  discard block
 block discarded – undo
14 14
     return $length % 2 == 0;
15 15
 }
16 16
 
17
-function process_jsons($input, $locationNames){
17
+function process_jsons($input, $locationNames) {
18 18
     $input[0]['outbounds'] = array_merge($input[0]['outbounds'], array_filter($locationNames));
19 19
     return $input;
20 20
 }
21 21
 
22
-function extract_names($input){
23
-    foreach($input as $config){
24
-        if ($config['tag'] !== ""){
22
+function extract_names($input) {
23
+    foreach ($input as $config) {
24
+        if ($config['tag'] !== "") {
25 25
              $locationNames[] = $config['tag'];
26 26
         }
27 27
     }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 
276 276
 function ShadowsocksSingbox($ShadowsocksUrl) {
277 277
     $decoded_shadowsocks = ParseShadowsocks($ShadowsocksUrl);
278
-    if (is_null($decoded_shadowsocks['name']) || $decoded_shadowsocks['name'] === ""){
278
+    if (is_null($decoded_shadowsocks['name']) || $decoded_shadowsocks['name'] === "") {
279 279
         return null;
280 280
     }
281 281
     if ($decoded_shadowsocks['encryption_method'] === "chacha20-poly1305") {
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
     return $configResult;
376 376
 }
377 377
 
378
-function GenerateConfig($input, $output, $theType){
378
+function GenerateConfig($input, $output, $theType) {
379 379
     $outbound = [];
380 380
     $v2ray_subscription = str_replace(" ", "%20", $input);
381 381
 
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
     foreach ($configArray as $config) {
384 384
         $configType = detect_type($config);
385 385
         $config = str_replace("%20", " ", $config);
386
-        switch($configType) {
386
+        switch ($configType) {
387 387
             case "vmess":
388 388
                 $configSingbox = VmessSingbox($config);
389 389
                 break;
@@ -403,9 +403,9 @@  discard block
 block discarded – undo
403 403
                 $configSingbox = ShadowsocksSingbox($config);
404 404
                 break;
405 405
         }
406
-        if (!is_null($configSingbox)){
406
+        if (!is_null($configSingbox)) {
407 407
             $configName = $configSingbox['tag'];
408
-            if (stripos($configName, "RELAY
Please login to merge, or discard this patch.