Passed
Push — master ( 0b924f...32b954 )
by Tomasz
04:33
created
web/user/API.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     'getUserCerts',
40 40
 ];
41 41
 
42
-function getRequest($varName,$filter) {
42
+function getRequest($varName, $filter) {
43 43
     $safeText = ["options"=>["regexp"=>"/^[\w\d-]+$/"]];
44 44
     switch ($filter) {
45 45
         case 'safe_text':
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 // make sure this is a known action
59 59
 $actionR = getRequest('action', 'safe_text');
60
-$action = array_search($actionR,LISTOFACTIONS) ? $actionR : FALSE;
60
+$action = array_search($actionR, LISTOFACTIONS) ? $actionR : FALSE;
61 61
 if ($action === FALSE) {
62 62
     exit;
63 63
 }
@@ -65,18 +65,18 @@  discard block
 block discarded – undo
65 65
 $lang = $langR ? $validator->supportedLanguage($langR) : FALSE;
66 66
 $deviceR = getRequest('device', 'safe_text');
67 67
 $device = $deviceR ? $validator->Device($deviceR) : FALSE;
68
-$idpR = getRequest('idp','int');
68
+$idpR = getRequest('idp', 'int');
69 69
 $idp = $idpR ? $validator->IdP($idpR)->identifier : FALSE;
70
-$profileR = getRequest('profile','int');
70
+$profileR = getRequest('profile', 'int');
71 71
 $profile = $profileR ? $validator->Profile($profileR)->identifier : FALSE;
72
-$federationR = getRequest('federation','safe_text');
72
+$federationR = getRequest('federation', 'safe_text');
73 73
 $federation = $federationR ? $validator->Federation($deviceR)->tld : FALSE;
74
-$disco = getRequest('disco','int');
75
-$width = getRequest('width','int') ?? 0;
76
-$height = getRequest('height','int') ?? 0;
77
-$sort = getRequest('sort','int') ?? 0;
78
-$generatedfor = getRequest('generatedfor','safe_text') ?? 'user';
79
-$token = getRequest('token','safe_text');
74
+$disco = getRequest('disco', 'int');
75
+$width = getRequest('width', 'int') ?? 0;
76
+$height = getRequest('height', 'int') ?? 0;
77
+$sort = getRequest('sort', 'int') ?? 0;
78
+$generatedfor = getRequest('generatedfor', 'safe_text') ?? 'user';
79
+$token = getRequest('token', 'safe_text');
80 80
 
81 81
 
82 82
 switch ($action) {
Please login to merge, or discard this patch.