@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | public function __construct() |
91 | 91 | { |
92 | 92 | |
93 | - $keyword_replace = function ($keywords, $text, $ncs = false) { |
|
93 | + $keyword_replace = function($keywords, $text, $ncs = false) { |
|
94 | 94 | $cm = $ncs ? 'i' : ''; |
95 | 95 | foreach ($keywords as $keyword) { |
96 | 96 | $search[] = "/(\\b$keyword\\b)/" . $cm; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | return preg_replace($search, $replace, $text); |
104 | 104 | }; |
105 | 105 | |
106 | - $preproc_replace = function ($preproc, $text) { |
|
106 | + $preproc_replace = function($preproc, $text) { |
|
107 | 107 | foreach ($preproc as $proc) { |
108 | 108 | $search[] = "/(\\s*#\s*$proc\\b)/"; |
109 | 109 | $replace[] = '<span class="keyword">\\0</span>'; |
@@ -112,11 +112,11 @@ discard block |
||
112 | 112 | return preg_replace($search, $replace, $text); |
113 | 113 | }; |
114 | 114 | |
115 | - $sch_syntax_helper = function ($text) { |
|
115 | + $sch_syntax_helper = function($text) { |
|
116 | 116 | return $text; |
117 | 117 | }; |
118 | 118 | |
119 | - $syntax_highlight_helper = function ($text, $language) use ($keyword_replace, $preproc_replace) { |
|
119 | + $syntax_highlight_helper = function($text, $language) use ($keyword_replace, $preproc_replace) { |
|
120 | 120 | $preproc = []; |
121 | 121 | $preproc['C++'] = [ |
122 | 122 | 'if', |
@@ -1921,66 +1921,64 @@ discard block |
||
1921 | 1921 | 'PL/I' => true, |
1922 | 1922 | 'SQL' => true, |
1923 | 1923 | ]; |
1924 | - $ncs = false; |
|
1924 | + $ncs = false; |
|
1925 | 1925 | if (array_key_exists($language, $case_insensitive)) { |
1926 | 1926 | $ncs = true; |
1927 | 1927 | } |
1928 | 1928 | |
1929 | 1929 | $text = array_key_exists($language, $preproc) ? |
1930 | - $preproc_replace($preproc[$language], $text) : |
|
1931 | - $text; |
|
1930 | + $preproc_replace($preproc[$language], $text) : $text; |
|
1932 | 1931 | $text = array_key_exists($language, $keywords) ? |
1933 | - $keyword_replace($keywords[$language], $text, $ncs) : |
|
1934 | - $text; |
|
1932 | + $keyword_replace($keywords[$language], $text, $ncs) : $text; |
|
1935 | 1933 | |
1936 | 1934 | return $text; |
1937 | 1935 | }; |
1938 | 1936 | |
1939 | - $rtrim1 = function ($span, $lang, $ch) use ($syntax_highlight_helper) { |
|
1937 | + $rtrim1 = function($span, $lang, $ch) use ($syntax_highlight_helper) { |
|
1940 | 1938 | return $syntax_highlight_helper(substr($span, 0, -1), $lang); |
1941 | 1939 | }; |
1942 | 1940 | |
1943 | - $rtrim1_htmlesc = function ($span, $lang, $ch) { |
|
1941 | + $rtrim1_htmlesc = function($span, $lang, $ch) { |
|
1944 | 1942 | return htmlspecialchars(substr($span, 0, -1)); |
1945 | 1943 | }; |
1946 | 1944 | |
1947 | - $sch_rtrim1 = function ($span, $lang, $ch) use ($sch_syntax_helper) { |
|
1945 | + $sch_rtrim1 = function($span, $lang, $ch) use ($sch_syntax_helper) { |
|
1948 | 1946 | return $sch_syntax_helper(substr($span, 0, -1)); |
1949 | 1947 | }; |
1950 | 1948 | |
1951 | - $rtrim2 = function ($span, $lang, $ch) { |
|
1949 | + $rtrim2 = function($span, $lang, $ch) { |
|
1952 | 1950 | return substr($span, 0, -2); |
1953 | 1951 | }; |
1954 | 1952 | |
1955 | - $syn_proc = function ($span, $lang, $ch) use ($syntax_highlight_helper) { |
|
1953 | + $syn_proc = function($span, $lang, $ch) use ($syntax_highlight_helper) { |
|
1956 | 1954 | return $syntax_highlight_helper($span, $lang); |
1957 | 1955 | }; |
1958 | 1956 | |
1959 | - $dash_putback = function ($span, $lang, $ch) use ($syntax_highlight_helper) { |
|
1957 | + $dash_putback = function($span, $lang, $ch) use ($syntax_highlight_helper) { |
|
1960 | 1958 | return $syntax_highlight_helper('-' . $span, $lang); |
1961 | 1959 | }; |
1962 | 1960 | |
1963 | - $slash_putback = function ($span, $lang, $ch) use ($syntax_highlight_helper) { |
|
1961 | + $slash_putback = function($span, $lang, $ch) use ($syntax_highlight_helper) { |
|
1964 | 1962 | return $syntax_highlight_helper('/' . $span, $lang); |
1965 | 1963 | }; |
1966 | 1964 | |
1967 | - $slash_putback_rtrim1 = function ($span, $lang, $ch) use ($rtrim1) { |
|
1965 | + $slash_putback_rtrim1 = function($span, $lang, $ch) use ($rtrim1) { |
|
1968 | 1966 | return $rtrim1('/' . $span, $lang, $ch); |
1969 | 1967 | }; |
1970 | 1968 | |
1971 | - $lparen_putback = function ($span, $lang, $ch) use ($syntax_highlight_helper) { |
|
1969 | + $lparen_putback = function($span, $lang, $ch) use ($syntax_highlight_helper) { |
|
1972 | 1970 | return $syntax_highlight_helper('(' . $span, $lang); |
1973 | 1971 | }; |
1974 | 1972 | |
1975 | - $lparen_putback_rtrim1 = function ($span, $lang, $ch) use ($rtrim1) { |
|
1973 | + $lparen_putback_rtrim1 = function($span, $lang, $ch) use ($rtrim1) { |
|
1976 | 1974 | return $rtrim1('(' . $span, $lang, $ch); |
1977 | 1975 | }; |
1978 | 1976 | |
1979 | - $prepend_xml_opentag = function ($span, $lang, $ch) { |
|
1977 | + $prepend_xml_opentag = function($span, $lang, $ch) { |
|
1980 | 1978 | return '<span class="xml_tag"><' . $span; |
1981 | 1979 | }; |
1982 | 1980 | |
1983 | - $proc_void = function ($span, $lang, $ch) { |
|
1981 | + $proc_void = function($span, $lang, $ch) { |
|
1984 | 1982 | return $span; |
1985 | 1983 | }; |
1986 | 1984 | |
@@ -2442,8 +2440,7 @@ discard block |
||
2442 | 2440 | |
2443 | 2441 | $oldstate = $state; |
2444 | 2442 | $state = array_key_exists($ch, $this->states[$language][$state]) ? |
2445 | - $this->states[$language][$state][$ch] : |
|
2446 | - $this->states[$language][$state][0]; |
|
2443 | + $this->states[$language][$state][$ch] : $this->states[$language][$state][0]; |
|
2447 | 2444 | |
2448 | 2445 | $span .= $ch; |
2449 | 2446 |
@@ -212,7 +212,7 @@ |
||
212 | 212 | $status = -1; // ini |
213 | 213 | if ($rs->recordCount() and ($rs->fields['vacrelid'] == $toid)) { |
214 | 214 | // table exists in pg_autovacuum, UPDATE |
215 | - $sql = sprintf("UPDATE \"pg_catalog\".\"pg_autovacuum\" SET |
|
215 | + $sql = sprintf("UPDATE \"pg_catalog\".\"pg_autovacuum\" SET |
|
216 | 216 | enabled = '%s', |
217 | 217 | vac_base_thresh = %s, |
218 | 218 | vac_scale_factor = %s, |
@@ -394,7 +394,7 @@ |
||
394 | 394 | // Pick out array entries by carefully parsing. This is necessary in order |
395 | 395 | // to cope with double quotes and commas, etc. |
396 | 396 | $elements = []; |
397 | - $i = $j = 0; |
|
397 | + $i = $j = 0; |
|
398 | 398 | $in_quotes = false; |
399 | 399 | while ($i < strlen($arr)) { |
400 | 400 | // If current char is a double quote and it's not escaped, then |
@@ -2075,7 +2075,7 @@ |
||
2075 | 2075 | // Pick out individual ACE's by carefully parsing. This is necessary in order |
2076 | 2076 | // to cope with usernames and stuff that contain commas |
2077 | 2077 | $aces = []; |
2078 | - $i = $j = 0; |
|
2078 | + $i = $j = 0; |
|
2079 | 2079 | $in_quotes = false; |
2080 | 2080 | while ($i < strlen($acl)) { |
2081 | 2081 | // If current char is a double quote and it's not escaped, then |
@@ -92,7 +92,7 @@ |
||
92 | 92 | $lang = $this->lang; |
93 | 93 | $data = $misc->getDatabaseAccessor(); |
94 | 94 | |
95 | - $attPre = function (&$rowdata) use ($data) { |
|
95 | + $attPre = function(&$rowdata) use ($data) { |
|
96 | 96 | $rowdata->fields['+type'] = $data->formatType($rowdata->fields['type'], $rowdata->fields['atttypmod']); |
97 | 97 | }; |
98 | 98 |
@@ -638,7 +638,7 @@ |
||
638 | 638 | echo '<p>' . (($defaults['autovacuum'] == 'on') ? $lang['strturnedon'] : $lang['strturnedoff']) . '</p>'; |
639 | 639 | echo "<p class=\"message\">{$lang['strnotdefaultinred']}</p>"; |
640 | 640 | |
641 | - $enlight = function ($f, $p) { |
|
641 | + $enlight = function($f, $p) { |
|
642 | 642 | if (isset($f[$p[0]]) and ($f[$p[0]] != $p[1])) { |
643 | 643 | return '<span style="color:#F33;font-weight:bold">' . htmlspecialchars($f[$p[0]]) . '</span>'; |
644 | 644 | } |
@@ -121,7 +121,7 @@ |
||
121 | 121 | * This is a callback function to display the result of each separate query |
122 | 122 | * @param ADORecordSet $rs The recordset returned by the script execetor |
123 | 123 | */ |
124 | - $sqlCallback = function ($query, $rs, $lineno) use ($data, $misc, $lang, $_connection) { |
|
124 | + $sqlCallback = function($query, $rs, $lineno) use ($data, $misc, $lang, $_connection) { |
|
125 | 125 | |
126 | 126 | // Check if $rs is false, if so then there was a fatal error |
127 | 127 | if ($rs === false) { |
@@ -91,11 +91,11 @@ |
||
91 | 91 | $lang = $this->lang; |
92 | 92 | $data = $misc->getDatabaseAccessor(); |
93 | 93 | |
94 | - $renderRoleConnLimit = function ($val) use ($lang) { |
|
94 | + $renderRoleConnLimit = function($val) use ($lang) { |
|
95 | 95 | return $val == '-1' ? $lang['strnolimit'] : htmlspecialchars($val); |
96 | 96 | }; |
97 | 97 | |
98 | - $renderRoleExpires = function ($val) use ($lang) { |
|
98 | + $renderRoleExpires = function($val) use ($lang) { |
|
99 | 99 | return $val == 'infinity' ? $lang['strnever'] : htmlspecialchars($val); |
100 | 100 | }; |
101 | 101 |
@@ -100,7 +100,7 @@ |
||
100 | 100 | $lang = $this->lang; |
101 | 101 | $data = $misc->getDatabaseAccessor(); |
102 | 102 | |
103 | - $tgPre = function (&$rowdata, $actions) use ($data) { |
|
103 | + $tgPre = function(&$rowdata, $actions) use ($data) { |
|
104 | 104 | // toggle enable/disable trigger per trigger |
105 | 105 | if (!$data->phpBool($rowdata->fields['tgenabled'])) { |
106 | 106 | unset($actions['disable']); |