@@ -248,7 +248,7 @@ |
||
248 | 248 | $this->printTitle($lang['strproperties'], 'pg.type'); |
249 | 249 | $this->printMsg($msg); |
250 | 250 | |
251 | - $attPre = function (&$rowdata) use ($data) { |
|
251 | + $attPre = function(&$rowdata) use ($data) { |
|
252 | 252 | $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']); |
253 | 253 | }; |
254 | 254 |
@@ -98,7 +98,7 @@ discard block |
||
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 |
||
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'])) { |
@@ -103,12 +103,12 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -63,7 +63,7 @@ |
||
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 |
@@ -45,7 +45,7 @@ |
||
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']; |
@@ -99,7 +99,7 @@ |
||
99 | 99 | $lang = $this->lang; |
100 | 100 | $data = $this->misc->getDatabaseAccessor(); |
101 | 101 | |
102 | - $tgPre = function (&$rowdata, $actions) use ($data) { |
|
102 | + $tgPre = function(&$rowdata, $actions) use ($data) { |
|
103 | 103 | // toggle enable/disable trigger per trigger |
104 | 104 | if (!$data->phpBool($rowdata->fields['tgenabled'])) { |
105 | 105 | unset($actions['disable']); |
@@ -93,7 +93,7 @@ |
||
93 | 93 | |
94 | 94 | $reqvars = $this->misc->getRequestVars('schema'); |
95 | 95 | |
96 | - $getIcon = function ($f) { |
|
96 | + $getIcon = function($f) { |
|
97 | 97 | switch ($f['contype']) { |
98 | 98 | case 'u': |
99 | 99 | return 'UniqueConstraint'; |
@@ -141,7 +141,7 @@ |
||
141 | 141 | foreach ($alltabs as $tab_id => $tab) { |
142 | 142 | if (!isset($tab['hide']) || $tab['hide'] !== true) { |
143 | 143 | $tabs[$tab_id] = $tab; |
144 | - $tabs[$tab_id]['active'] = $active = ($tab_id == $activetab) ? ' active' : ''; |
|
144 | + $tabs[$tab_id]['active'] = $active = ($tab_id == $activetab) ? ' active' : ''; |
|
145 | 145 | $tabs[$tab_id]['tablink'] = str_replace(['&', '.php'], ['&', ''], htmlentities($this->getActionUrl($tab, $_REQUEST, $from))); |
146 | 146 | if (isset($tab['icon']) && $icon = $this->misc->icon($tab['icon'])) { |
147 | 147 | $tabs[$tab_id]['iconurl'] = $icon; |
@@ -101,11 +101,11 @@ |
||
101 | 101 | $lang = $this->lang; |
102 | 102 | $data = $this->misc->getDatabaseAccessor(); |
103 | 103 | |
104 | - $renderRoleConnLimit = function ($val) use ($lang) { |
|
104 | + $renderRoleConnLimit = function($val) use ($lang) { |
|
105 | 105 | return '-1' == $val ? $lang['strnolimit'] : htmlspecialchars($val); |
106 | 106 | }; |
107 | 107 | |
108 | - $renderRoleExpires = function ($val) use ($lang) { |
|
108 | + $renderRoleExpires = function($val) use ($lang) { |
|
109 | 109 | return 'infinity' == $val ? $lang['strnever'] : htmlspecialchars($val); |
110 | 110 | }; |
111 | 111 |