Passed
Push — main ( 72b417...516af1 )
by YeBeKhe
02:02
created
modules/singbox.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -3,10 +3,10 @@  discard block
 block discarded – undo
3 3
 header("Content-type: application/json;");
4 4
 
5 5
 function create_tehran_timestamp_tomorrow() {
6
-  date_default_timezone_set('Asia/Tehran');
7
-  $dateTomorrow = new DateTime('tomorrow');
8
-  $timestampTomorrow = strtotime($dateTomorrow->format('Y-m-d H:i:s'));
9
-  return $timestampTomorrow;
6
+    date_default_timezone_set('Asia/Tehran');
7
+    $dateTomorrow = new DateTime('tomorrow');
8
+    $timestampTomorrow = strtotime($dateTomorrow->format('Y-m-d H:i:s'));
9
+    return $timestampTomorrow;
10 10
 }
11 11
 
12 12
 function isEvenLength($str) {
@@ -22,27 +22,27 @@  discard block
 block discarded – undo
22 22
 function extract_names($input){
23 23
     foreach($input as $config){
24 24
         if ($config['tag'] !== ""){
25
-             $locationNames[] = $config['tag'];
25
+                $locationNames[] = $config['tag'];
26 26
         }
27 27
     }
28 28
     return $locationNames;
29 29
 }
30 30
 
31 31
 function processWsPath($input) {
32
-  if (strpos($input, '/') === 0) {
32
+    if (strpos($input, '/') === 0) {
33 33
     $input = substr($input, 1);
34
-  }
35
-  $max_early_data = 0;
36
-  if (strpos($input, '?ed=2048') !== false) {
34
+    }
35
+    $max_early_data = 0;
36
+    if (strpos($input, '?ed=2048') !== false) {
37 37
     $input = str_replace('?ed=2048', '', $input);
38 38
     $max_early_data = 2048;
39
-  }
40
-  $output = [
41
-      "path" => "/" . $input,
42
-      "max_early_data" => $max_early_data
43
-  ];
39
+    }
40
+    $output = [
41
+        "path" => "/" . $input,
42
+        "max_early_data" => $max_early_data
43
+    ];
44 44
   
45
-  return $output;
45
+    return $output;
46 46
 }
47 47
 
48 48
 function VmessSingbox($VmessUrl)
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
             ],
328 328
         ];
329 329
     if (!isset($decodedTuic['params']['alpn']) || is_null($decodedTuic['params']['alpn']) || $decodedTuic['params']['alpn'] === "") {
330
-      unset($configResult['tls']["alpn"]);
330
+        unset($configResult['tls']["alpn"]);
331 331
     }
332 332
 
333 333
     return $configResult;
Please login to merge, or discard this patch.