Passed
Branch develop (7ff7f1)
by Felipe
10:16 queued 06:26
created
index.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  */
6 6
 require_once './src/lib.inc.php';
7 7
 
8
-$app->post('/redirect[/{subject}]', function ($request, $response, $args) {
8
+$app->post('/redirect[/{subject}]', function($request, $response, $args) {
9 9
     $body         = $response->getBody();
10 10
     $query_string = $request->getUri()->getQuery();
11 11
     $misc         = $this->misc;
@@ -50,33 +50,33 @@  discard block
 block discarded – undo
50 50
     }
51 51
 });
52 52
 
53
-$app->get('/redirect[/{subject}]', function ($request, $response, $args) {
53
+$app->get('/redirect[/{subject}]', function($request, $response, $args) {
54 54
     $subject        = (isset($args['subject'])) ? $args['subject'] : 'root';
55 55
     $destinationurl = $this->utils->getDestinationWithLastTab($subject);
56 56
     return $response->withStatus(302)->withHeader('Location', $destinationurl);
57 57
 });
58 58
 
59
-$app->get('/src/views/browser', function ($request, $response, $args) {
59
+$app->get('/src/views/browser', function($request, $response, $args) {
60 60
     $controller = new \PHPPgAdmin\Controller\BrowserController($this, true);
61 61
     return $controller->render();
62 62
 });
63 63
 
64
-$app->get('/src/views/login', function ($request, $response, $args) {
64
+$app->get('/src/views/login', function($request, $response, $args) {
65 65
     $controller = new \PHPPgAdmin\Controller\LoginController($this, true);
66 66
     return $controller->render();
67 67
 });
68 68
 
69
-$app->get('/src/views/servers', function ($request, $response, $args) {
69
+$app->get('/src/views/servers', function($request, $response, $args) {
70 70
     $controller = new \PHPPgAdmin\Controller\ServersController($this, true);
71 71
     return $controller->render();
72 72
 });
73 73
 
74
-$app->get('/src/views/intro', function ($request, $response, $args) {
74
+$app->get('/src/views/intro', function($request, $response, $args) {
75 75
     $controller = new \PHPPgAdmin\Controller\IntroController($this, true);
76 76
     return $controller->render();
77 77
 });
78 78
 
79
-$app->map(['GET', 'POST'], '/src/views/{subject}', function ($request, $response, $args) {
79
+$app->map(['GET', 'POST'], '/src/views/{subject}', function($request, $response, $args) {
80 80
     if ($this->misc->getServerId() === null) {
81 81
         return $response->withStatus(302)->withHeader('Location', SUBFOLDER . '/src/views/servers');
82 82
     }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     return $controller->render();
95 95
 });
96 96
 
97
-$app->get('/[{subject}]', function ($request, $response, $args) {
97
+$app->get('/[{subject}]', function($request, $response, $args) {
98 98
     $subject      = (isset($args['subject'])) ? $args['subject'] : 'intro';
99 99
     $_server_info = $this->misc->getServerInfo();
100 100
     $query_string = $request->getUri()->getQuery();
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
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
         $lang = $this->lang;
114 114
         $data = $misc->getDatabaseAccessor();
115 115
 
116
-        $cnPre = function (&$rowdata) use ($data) {
116
+        $cnPre = function(&$rowdata) use ($data) {
117 117
             if (is_null($rowdata->fields['consrc'])) {
118 118
                 $atts                           = $data->getAttributeNames($_REQUEST['table'], explode(' ', $rowdata->fields['indkey']));
119 119
                 $rowdata->fields['+definition'] = ($rowdata->fields['contype'] == 'u' ? 'UNIQUE (' : 'PRIMARY KEY (') . join(',', $atts) . ')';
Please login to merge, or discard this patch.
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.
src/lib.inc.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -103,12 +103,12 @@  discard block
 block discarded – undo
103 103
 $container['requestobj']  = $container['request'];
104 104
 $container['responseobj'] = $container['response'];
105 105
 
106
-$container['utils'] = function ($c) {
106
+$container['utils'] = function($c) {
107 107
     $utils = new \PHPPgAdmin\ContainerUtils($c);
108 108
     return $utils;
109 109
 };
110 110
 
111
-$container['conf'] = function ($c) use ($conf) {
111
+$container['conf'] = function($c) use ($conf) {
112 112
 
113 113
     //\Kint::dump($conf);
114 114
     // Plugins are removed
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     return $conf;
118 118
 };
119 119
 
120
-$container['lang'] = function ($c) {
120
+$container['lang'] = function($c) {
121 121
     include_once BASE_PATH . '/src/translations.php';
122 122
 
123 123
     $c['appLangFiles'] = $appLangFiles;
@@ -127,12 +127,12 @@  discard block
 block discarded – undo
127 127
     return $lang;
128 128
 };
129 129
 
130
-$container['plugin_manager'] = function ($c) {
130
+$container['plugin_manager'] = function($c) {
131 131
     $plugin_manager = new \PHPPgAdmin\PluginManager($c);
132 132
     return $plugin_manager;
133 133
 };
134 134
 
135
-$container['serializer'] = function ($c) {
135
+$container['serializer'] = function($c) {
136 136
     $serializerbuilder = \JMS\Serializer\SerializerBuilder::create();
137 137
     $serializer        = $serializerbuilder
138 138
         ->setCacheDir(BASE_PATH . '/temp/jms')
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 };
143 143
 
144 144
 // Create Misc class references
145
-$container['misc'] = function ($c) {
145
+$container['misc'] = function($c) {
146 146
     $misc = new \PHPPgAdmin\Misc($c);
147 147
 
148 148
     $conf = $c->get('conf');
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 };
241 241
 
242 242
 // Register Twig View helper
243
-$container['view'] = function ($c) {
243
+$container['view'] = function($c) {
244 244
     $conf = $c->get('conf');
245 245
     $misc = $c->misc;
246 246
 
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
     return $view;
277 277
 };
278 278
 
279
-$container['haltHandler'] = function ($c) {
280
-    return function ($request, $response, $exits, $status = 500) use ($c) {
279
+$container['haltHandler'] = function($c) {
280
+    return function($request, $response, $exits, $status = 500) use ($c) {
281 281
         $title = 'PHPPgAdmin Error';
282 282
 
283 283
         $html = '<p>The application could not run because of the following error:</p>';
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 
308 308
 // Set the requestobj and responseobj properties of the container
309 309
 // as the value of $request and $response, which already contain the route
310
-$app->add(function ($request, $response, $next) {
310
+$app->add(function($request, $response, $next) {
311 311
     $this['requestobj']  = $request;
312 312
     $this['responseobj'] = $response;
313 313
 
Please login to merge, or discard this patch.