Passed
Push — master ( 3edac2...6f4e22 )
by Gaetano
06:14
created
debugger/controller.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 // Make sure we set the correct charset type for output, so that we can display all characters
18 18
 header('Content-Type: text/html; charset=utf-8');
19 19
 
20
-include __DIR__ . '/common.php';
20
+include __DIR__.'/common.php';
21 21
 if ($action == '') {
22 22
     $action = 'list';
23 23
 }
@@ -33,24 +33,24 @@  discard block
 block discarded – undo
33 33
     /// @const JSXMLRPC_PATH Path to the visual xmlrpc editing dialog's containing folder. Can be absolute, or
34 34
     ///         relative to this debugger's folder.
35 35
     if (defined('JSXMLRPC_PATH')) {
36
-        $editorpaths = array(JSXMLRPC_PATH[0] === '/' ? JSXMLRPC_PATH : (__DIR__ . '/' . JSXMLRPC_PATH));
36
+        $editorpaths = array(JSXMLRPC_PATH[0] === '/' ? JSXMLRPC_PATH : (__DIR__.'/'.JSXMLRPC_PATH));
37 37
     } else {
38 38
         $editorpaths = array(
39
-            __DIR__ . '/vendor/phpxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via composer in debugger
40
-            __DIR__ . '/node_modules/@jsxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via npm in debugger
41
-            __DIR__ . '/../vendor/phpxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via composer
42
-            __DIR__ . '/../node_modules/@jsxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via npm
43
-            __DIR__ . '/../../jsxmlrpc/debugger/', // this package is a composer dependency, jsxmlrpc too
39
+            __DIR__.'/vendor/phpxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via composer in debugger
40
+            __DIR__.'/node_modules/@jsxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via npm in debugger
41
+            __DIR__.'/../vendor/phpxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via composer
42
+            __DIR__.'/../node_modules/@jsxmlrpc/jsxmlrpc/debugger/', // this package is top-level, jsxmlrpc installed via npm
43
+            __DIR__.'/../../jsxmlrpc/debugger/', // this package is a composer dependency, jsxmlrpc too
44 44
         );
45 45
     }
46
-    foreach($editorpaths as $editorpath) {
47
-        if (is_file(realpath($editorpath . 'visualeditor.html'))) {
46
+    foreach ($editorpaths as $editorpath) {
47
+        if (is_file(realpath($editorpath.'visualeditor.html'))) {
48 48
             $haseditor = true;
49 49
             break;
50 50
         }
51 51
     }
52 52
     if ($haseditor) {
53
-        $editorurlpath = preg_replace('|^' . preg_quote(__DIR__, '|') .'|', '', $editorpath);
53
+        $editorurlpath = preg_replace('|^'.preg_quote(__DIR__, '|').'|', '', $editorpath);
54 54
 
55 55
         /// @todo for cases 3, 4 and 5 above, look at `parse_url($_SERVER['REQUEST_URI'],  PHP_URL_PATH)` and check if the
56 56
         ///       web root is not pointing directly at this folder, as in that case the link to the visualeditor will not
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         }
229 229
 
230 230
         function activateeditor() {
231
-            var url = '<?php echo $editorurlpath; ?>visualeditor.html?params=<?php echo str_replace(array("\\", "'"), array( "\\\\","\\'"), $alt_payload); ?>';
231
+            var url = '<?php echo $editorurlpath; ?>visualeditor.html?params=<?php echo str_replace(array("\\", "'"), array("\\\\", "\\'"), $alt_payload); ?>';
232 232
             if (document.frmaction.wstype.value == "1")
233 233
                 url += '&type=jsonrpc';
234 234
             var wnd = window.open(url, '_blank', 'width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=1');
@@ -265,9 +265,9 @@  discard block
 block discarded – undo
265 265
         echo ' document.forms[2].submit();';
266 266
     } ?>">
267 267
 <h1>XMLRPC
268
-    <form name="frmxmlrpc" style="display: inline;" action="."><input name="yes" type="radio" onclick="switchtransport(0);" <?php if (!class_exists('\PhpXmlRpc\Client')) { echo 'disabled="disabled"';} ?>/></form>
268
+    <form name="frmxmlrpc" style="display: inline;" action="."><input name="yes" type="radio" onclick="switchtransport(0);" <?php if (!class_exists('\PhpXmlRpc\Client')) { echo 'disabled="disabled"'; } ?>/></form>
269 269
     /
270
-    <form name="frmjsonrpc" style="display: inline;" action="."><input name="yes" type="radio" onclick="switchtransport(1);" <?php if (!class_exists('\PhpXmlRpc\JsonRpc\Client')) { echo 'disabled="disabled"';} ?>/></form>
270
+    <form name="frmjsonrpc" style="display: inline;" action="."><input name="yes" type="radio" onclick="switchtransport(1);" <?php if (!class_exists('\PhpXmlRpc\JsonRpc\Client')) { echo 'disabled="disabled"'; } ?>/></form>
271 271
     JSONRPC Debugger (based on the <a href="https://gggeek.github.io/phpxmlrpc/">PHPXMLRPC</a> library)
272 272
 </h1>
273 273
 <form name="frmaction" method="get" action="action.php" target="frmaction" onSubmit="switchFormMethod();">
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
                 </select>
331 331
             </td>
332 332
             <td class="labelcell">Timeout:</td>
333
-            <td><input type="text" name="timeout" size="3" value="<?php if ($timeout > 0) { echo $timeout; } ?>"/></td>
333
+            <td><input type="text" name="timeout" size="3" value="<?php if ($timeout>0) { echo $timeout; } ?>"/></td>
334 334
             <td></td>
335 335
             <td></td>
336 336
         </tr>
Please login to merge, or discard this patch.