Passed
Pull Request — develop (#92)
by Felipe
06:21
created
src/controllers/TblpropertiesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $lang = $this->lang;
99 99
         $data = $misc->getDatabaseAccessor();
100 100
 
101
-        $attPre = function (&$rowdata, $actions) use ($data) {
101
+        $attPre = function(&$rowdata, $actions) use ($data) {
102 102
             $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']);
103 103
             $attname                  = $rowdata->fields['attname'];
104 104
             $table                    = $_REQUEST['table'];
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             return $actions;
112 112
         };
113 113
 
114
-        $cstrRender = function ($s, $p) use ($misc, $data) {
114
+        $cstrRender = function($s, $p) use ($misc, $data) {
115 115
             $str = '';
116 116
             foreach ($p['keys'] as $k => $c) {
117 117
                 if (is_null($p['keys'][$k]['consrc'])) {
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@  discard block
 block discarded – undo
5 5
  */
6 6
 require_once './src/lib.inc.php';
7 7
 
8
-$app->get('/status', function ($request, $response, $args) {
8
+$app->get('/status', function($request, $response, $args) {
9 9
     return $response
10 10
         ->withHeader('Content-type', 'application/json')
11 11
         ->withJson(['version' => $this->version]);
12 12
 });
13 13
 
14
-$app->post('/redirect[/{subject}]', function ($request, $response, $args) {
14
+$app->post('/redirect[/{subject}]', function($request, $response, $args) {
15 15
     $body         = $response->getBody();
16 16
     $query_string = $request->getUri()->getQuery();
17 17
     $misc         = $this->misc;
@@ -56,33 +56,33 @@  discard block
 block discarded – undo
56 56
     }
57 57
 });
58 58
 
59
-$app->get('/redirect[/{subject}]', function ($request, $response, $args) {
59
+$app->get('/redirect[/{subject}]', function($request, $response, $args) {
60 60
     $subject        = (isset($args['subject'])) ? $args['subject'] : 'root';
61 61
     $destinationurl = $this->utils->getDestinationWithLastTab($subject);
62 62
     return $response->withStatus(302)->withHeader('Location', $destinationurl);
63 63
 });
64 64
 
65
-$app->get('/src/views/browser', function ($request, $response, $args) {
65
+$app->get('/src/views/browser', function($request, $response, $args) {
66 66
     $controller = new \PHPPgAdmin\Controller\BrowserController($this, true);
67 67
     return $controller->render();
68 68
 });
69 69
 
70
-$app->get('/src/views/login', function ($request, $response, $args) {
70
+$app->get('/src/views/login', function($request, $response, $args) {
71 71
     $controller = new \PHPPgAdmin\Controller\LoginController($this, true);
72 72
     return $controller->render();
73 73
 });
74 74
 
75
-$app->get('/src/views/servers', function ($request, $response, $args) {
75
+$app->get('/src/views/servers', function($request, $response, $args) {
76 76
     $controller = new \PHPPgAdmin\Controller\ServersController($this, true);
77 77
     return $controller->render();
78 78
 });
79 79
 
80
-$app->get('/src/views/intro', function ($request, $response, $args) {
80
+$app->get('/src/views/intro', function($request, $response, $args) {
81 81
     $controller = new \PHPPgAdmin\Controller\IntroController($this, true);
82 82
     return $controller->render();
83 83
 });
84 84
 
85
-$app->map(['GET', 'POST'], '/src/views/{subject}', function ($request, $response, $args) {
85
+$app->map(['GET', 'POST'], '/src/views/{subject}', function($request, $response, $args) {
86 86
     if ($this->misc->getServerId() === null) {
87 87
         return $response->withStatus(302)->withHeader('Location', SUBFOLDER . '/src/views/servers');
88 88
     }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     return $controller->render();
101 101
 });
102 102
 
103
-$app->get('/[{subject}]', function ($request, $response, $args) {
103
+$app->get('/[{subject}]', function($request, $response, $args) {
104 104
     $subject      = (isset($args['subject'])) ? $args['subject'] : 'intro';
105 105
     $_server_info = $this->misc->getServerInfo();
106 106
     $query_string = $request->getUri()->getQuery();
Please login to merge, or discard this patch.
src/lib.inc.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
 $container['requestobj']  = $container['request'];
105 105
 $container['responseobj'] = $container['response'];
106 106
 
107
-$container['utils'] = function ($c) {
107
+$container['utils'] = function($c) {
108 108
     $utils = new \PHPPgAdmin\ContainerUtils($c);
109 109
     return $utils;
110 110
 };
111 111
 
112
-$container['conf'] = function ($c) use ($conf) {
112
+$container['conf'] = function($c) use ($conf) {
113 113
 
114 114
     //\Kint::dump($conf);
115 115
     // Plugins are removed
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     return $conf;
119 119
 };
120 120
 
121
-$container['lang'] = function ($c) {
121
+$container['lang'] = function($c) {
122 122
     include_once BASE_PATH . '/src/translations.php';
123 123
 
124 124
     $c['appLangFiles'] = $appLangFiles;
@@ -128,12 +128,12 @@  discard block
 block discarded – undo
128 128
     return $lang;
129 129
 };
130 130
 
131
-$container['plugin_manager'] = function ($c) {
131
+$container['plugin_manager'] = function($c) {
132 132
     $plugin_manager = new \PHPPgAdmin\PluginManager($c);
133 133
     return $plugin_manager;
134 134
 };
135 135
 
136
-$container['serializer'] = function ($c) {
136
+$container['serializer'] = function($c) {
137 137
     $serializerbuilder = \JMS\Serializer\SerializerBuilder::create();
138 138
     $serializer        = $serializerbuilder
139 139
         ->setCacheDir(BASE_PATH . '/temp/jms')
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 };
144 144
 
145 145
 // Create Misc class references
146
-$container['misc'] = function ($c) {
146
+$container['misc'] = function($c) {
147 147
     $this->misc = new \PHPPgAdmin\Misc($c);
148 148
 
149 149
     $conf = $c->get('conf');
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 };
242 242
 
243 243
 // Register Twig View helper
244
-$container['view'] = function ($c) {
244
+$container['view'] = function($c) {
245 245
     $conf       = $c->get('conf');
246 246
     $this->misc = $c->misc;
247 247
 
@@ -277,8 +277,8 @@  discard block
 block discarded – undo
277 277
     return $view;
278 278
 };
279 279
 
280
-$container['haltHandler'] = function ($c) {
281
-    return function ($request, $response, $exits, $status = 500) use ($c) {
280
+$container['haltHandler'] = function($c) {
281
+    return function($request, $response, $exits, $status = 500) use ($c) {
282 282
         $title = 'PHPPgAdmin Error';
283 283
 
284 284
         $html = '<p>The application could not run because of the following error:</p>';
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 
309 309
 // Set the requestobj and responseobj properties of the container
310 310
 // as the value of $request and $response, which already contain the route
311
-$app->add(function ($request, $response, $next) {
311
+$app->add(function($request, $response, $next) {
312 312
     $this['requestobj']  = $request;
313 313
     $this['responseobj'] = $response;
314 314
 
Please login to merge, or discard this patch.
src/controllers/RolesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,11 +90,11 @@
 block discarded – undo
90 90
         $lang = $this->lang;
91 91
         $data = $this->misc->getDatabaseAccessor();
92 92
 
93
-        $renderRoleConnLimit = function ($val) use ($lang) {
93
+        $renderRoleConnLimit = function($val) use ($lang) {
94 94
             return $val == '-1' ? $lang['strnolimit'] : htmlspecialchars($val);
95 95
         };
96 96
 
97
-        $renderRoleExpires = function ($val) use ($lang) {
97
+        $renderRoleExpires = function($val) use ($lang) {
98 98
             return $val == 'infinity' ? $lang['strnever'] : htmlspecialchars($val);
99 99
         };
100 100
 
Please login to merge, or discard this patch.
src/controllers/ColpropertiesController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         $lang = $this->lang;
64 64
         $data = $this->misc->getDatabaseAccessor();
65 65
 
66
-        $attPre = function (&$rowdata) use ($data) {
66
+        $attPre = function(&$rowdata) use ($data) {
67 67
             $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']);
68 68
         };
69 69
 
Please login to merge, or discard this patch.
src/controllers/ConstraintsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
         $lang = $this->lang;
116 116
         $data = $this->misc->getDatabaseAccessor();
117 117
 
118
-        $cnPre = function (&$rowdata) use ($data) {
118
+        $cnPre = function(&$rowdata) use ($data) {
119 119
             if (is_null($rowdata->fields['consrc'])) {
120 120
                 $atts                           = $data->getAttributeNames($_REQUEST['table'], explode(' ', $rowdata->fields['indkey']));
121 121
                 $rowdata->fields['+definition'] = ($rowdata->fields['contype'] == 'u' ? 'UNIQUE (' : 'PRIMARY KEY (') . join(',', $atts) . ')';
Please login to merge, or discard this patch.
src/controllers/UsersController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         $lang = $this->lang;
83 83
         $data = $this->misc->getDatabaseAccessor();
84 84
 
85
-        $renderUseExpires = function ($val) use ($lang) {
85
+        $renderUseExpires = function($val) use ($lang) {
86 86
             return $val == 'infinity' ? $lang['strnever'] : htmlspecialchars($val);
87 87
         };
88 88
 
Please login to merge, or discard this patch.
src/controllers/MaterializedviewpropertiesController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
         $lang = $this->lang;
92 92
         $data = $this->misc->getDatabaseAccessor();
93 93
 
94
-        $attPre = function (&$rowdata) use ($data) {
94
+        $attPre = function(&$rowdata) use ($data) {
95 95
             $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']);
96 96
         };
97 97
 
Please login to merge, or discard this patch.
src/controllers/CastsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $lang = $this->lang;
46 46
         $data = $this->misc->getDatabaseAccessor();
47 47
 
48
-        $renderCastContext = function ($val) use ($lang) {
48
+        $renderCastContext = function($val) use ($lang) {
49 49
             switch ($val) {
50 50
                 case 'e':return $lang['strno'];
51 51
                 case 'a':return $lang['strinassignment'];
Please login to merge, or discard this patch.