@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | ); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - public static function getOpts($args=array(), $cliOpts=array()) |
|
| 67 | + public static function getOpts($args = array(), $cliOpts = array()) |
|
| 68 | 68 | { |
| 69 | - if (count($args) > 0) |
|
| 69 | + if (count($args)>0) |
|
| 70 | 70 | // throw new \Exception('Missing library version argument'); |
| 71 | 71 | self::$libVersion = $args[0]; |
| 72 | 72 | |
@@ -169,17 +169,17 @@ discard block |
||
| 169 | 169 | $out = ''; |
| 170 | 170 | while (($start = strpos($content, $startTag, $last)) !== false) { |
| 171 | 171 | $end = strpos($content, $endTag, $start); |
| 172 | - $code = substr($content, $start + strlen($startTag), $end - $start - strlen($startTag)); |
|
| 173 | - if ($code[strlen($code) - 1] == "\n") { |
|
| 172 | + $code = substr($content, $start+strlen($startTag), $end-$start-strlen($startTag)); |
|
| 173 | + if ($code[strlen($code)-1] == "\n") { |
|
| 174 | 174 | $code = substr($code, 0, -1); |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | $code = str_replace(array('>', '<'), array('>', '<'), $code); |
| 178 | - $code = highlight_string('<?php ' . $code, true); |
|
| 178 | + $code = highlight_string('<?php '.$code, true); |
|
| 179 | 179 | $code = str_replace('<span style="color: #0000BB"><?php <br />', '<span style="color: #0000BB">', $code); |
| 180 | 180 | |
| 181 | - $out = $out . substr($content, $last, $start + strlen($startTag) - $last) . $code . $endTag; |
|
| 182 | - $last = $end + strlen($endTag); |
|
| 181 | + $out = $out.substr($content, $last, $start+strlen($startTag)-$last).$code.$endTag; |
|
| 182 | + $last = $end+strlen($endTag); |
|
| 183 | 183 | } |
| 184 | 184 | $out .= substr($content, $last, strlen($content)); |
| 185 | 185 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | use PhpXmlRpc\Builder; |
| 195 | 195 | |
| 196 | -function run_default($task=null, $args=array(), $cliOpts=array()) |
|
| 196 | +function run_default($task = null, $args = array(), $cliOpts = array()) |
|
| 197 | 197 | { |
| 198 | 198 | echo "Syntax: pake {\$pake-options} \$task \$lib-version [\$git-tag] {\$task-options}\n"; |
| 199 | 199 | echo "\n"; |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | echo " --zip=ZIP Location of the zip tool\n"; |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | -function run_getopts($task=null, $args=array(), $cliOpts=array()) |
|
| 214 | +function run_getopts($task = null, $args = array(), $cliOpts = array()) |
|
| 215 | 215 | { |
| 216 | 216 | Builder::getOpts($args, $cliOpts); |
| 217 | 217 | } |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | * Downloads source code in the build workspace directory, optionally checking out the given branch/tag |
| 221 | 221 | * @todo allow using current installation / dir as source, bypassing git clone in workspace - at least for doc generation |
| 222 | 222 | */ |
| 223 | -function run_init($task=null, $args=array(), $cliOpts=array()) |
|
| 223 | +function run_init($task = null, $args = array(), $cliOpts = array()) |
|
| 224 | 224 | { |
| 225 | 225 | // download the current version into the workspace |
| 226 | 226 | $targetDir = Builder::workspaceDir(); |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | * |
| 250 | 250 | * (does nothing by itself, as all the steps are managed via task dependencies) |
| 251 | 251 | */ |
| 252 | -function run_build($task=null, $args=array(), $cliOpts=array()) |
|
| 252 | +function run_build($task = null, $args = array(), $cliOpts = array()) |
|
| 253 | 253 | { |
| 254 | 254 | } |
| 255 | 255 | |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | /** |
| 266 | 266 | * Generates documentation in all formats |
| 267 | 267 | */ |
| 268 | -function run_doc($task=null, $args=array(), $cliOpts=array()) |
|
| 268 | +function run_doc($task = null, $args = array(), $cliOpts = array()) |
|
| 269 | 269 | { |
| 270 | 270 | // in |
| 271 | 271 | $srcDir = Builder::workspaceDir(); |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | |
| 277 | 277 | // from phpdoc comments using phpdocumentor |
| 278 | 278 | $cmd = Builder::tool('php'); |
| 279 | - pake_sh("$cmd " . Builder::toolsDir(). "/vendor/bin/phpdoc run --cache-folder ".Builder::buildDir()."/.phpdoc -d ".$srcDir.'/src'." -t ".$docDir.'/api --title PHP-XMLRPC --defaultpackagename PHPXMLRPC'); |
|
| 279 | + pake_sh("$cmd ".Builder::toolsDir()."/vendor/bin/phpdoc run --cache-folder ".Builder::buildDir()."/.phpdoc -d ".$srcDir.'/src'." -t ".$docDir.'/api --title PHP-XMLRPC --defaultpackagename PHPXMLRPC'); |
|
| 280 | 280 | |
| 281 | 281 | // from phpdoc comments using Sami |
| 282 | 282 | // deprecated on 2021/12, as Sami is abandonware |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | /** |
| 358 | 358 | * Creates the tarballs for a release |
| 359 | 359 | */ |
| 360 | -function run_dist($task=null, $args=array(), $cliOpts=array()) |
|
| 360 | +function run_dist($task = null, $args = array(), $cliOpts = array()) |
|
| 361 | 361 | { |
| 362 | 362 | // copy workspace dir into dist dir, without git |
| 363 | 363 | pake_mkdirs(Builder::distDir()); |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | // create tarballs |
| 373 | 373 | $cwd = getcwd(); |
| 374 | 374 | chdir(dirname(Builder::distDir())); |
| 375 | - foreach(Builder::distFiles() as $distFile) { |
|
| 375 | + foreach (Builder::distFiles() as $distFile) { |
|
| 376 | 376 | // php can not really create good zip files via phar: they are not compressed! |
| 377 | 377 | if (substr($distFile, -4) == '.zip') { |
| 378 | 378 | $cmd = Builder::tool('zip'); |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | chdir($cwd); |
| 391 | 391 | } |
| 392 | 392 | |
| 393 | -function run_clean_workspace($task=null, $args=array(), $cliOpts=array()) |
|
| 393 | +function run_clean_workspace($task = null, $args = array(), $cliOpts = array()) |
|
| 394 | 394 | { |
| 395 | 395 | if (realpath(__DIR__) === realpath(Builder::workspaceDir())) { |
| 396 | 396 | throw new \Exception("Can not remove workspace dir, as it is where pakefile is located!"); |
@@ -402,13 +402,13 @@ discard block |
||
| 402 | 402 | * Cleans up the whole build directory |
| 403 | 403 | * @todo 'make clean' usually just removes the results of the build, distclean removes all but sources |
| 404 | 404 | */ |
| 405 | -function run_clean($task=null, $args=array(), $cliOpts=array()) |
|
| 405 | +function run_clean($task = null, $args = array(), $cliOpts = array()) |
|
| 406 | 406 | { |
| 407 | 407 | pake_remove_dir(Builder::buildDir()); |
| 408 | 408 | } |
| 409 | 409 | |
| 410 | 410 | // helper task: display help text |
| 411 | -pake_task( 'default' ); |
|
| 411 | +pake_task('default'); |
|
| 412 | 412 | // internal task: parse cli options |
| 413 | 413 | pake_task('getopts'); |
| 414 | 414 | pake_task('init', 'getopts'); |
@@ -17,15 +17,15 @@ discard block |
||
| 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 | } |
| 24 | 24 | |
| 25 | 25 | // Relative path to the visual xmlrpc editing dialog |
| 26 | 26 | // We allow to easily configure this path via defines |
| 27 | -$editorpath = (defined('JSXMLRPC_PATH') ? JSXMLRPC_PATH : '../..') . '/jsxmlrpc/debugger/'; |
|
| 28 | -$editorlibs = (defined('JSXMLRPC_PATH') ? JSXMLRPC_PATH : '../..') . '/jsxmlrpc/lib/'; |
|
| 27 | +$editorpath = (defined('JSXMLRPC_PATH') ? JSXMLRPC_PATH : '../..').'/jsxmlrpc/debugger/'; |
|
| 28 | +$editorlibs = (defined('JSXMLRPC_PATH') ? JSXMLRPC_PATH : '../..').'/jsxmlrpc/lib/'; |
|
| 29 | 29 | ?> |
| 30 | 30 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| 31 | 31 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
@@ -231,9 +231,9 @@ discard block |
||
| 231 | 231 | echo ' document.forms[2].submit();'; |
| 232 | 232 | } ?>"> |
| 233 | 233 | <h1>XMLRPC |
| 234 | - <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> |
|
| 234 | + <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> |
|
| 235 | 235 | / |
| 236 | - <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> |
|
| 236 | + <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> |
|
| 237 | 237 | JSONRPC Debugger (based on the <a href="https://gggeek.github.io/phpxmlrpc/">PHP-XMLRPC</a> library) |
| 238 | 238 | </h1> |
| 239 | 239 | <form name="frmaction" method="get" action="action.php" target="frmaction" onSubmit="switchFormMethod();"> |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | </select> |
| 289 | 289 | </td> |
| 290 | 290 | <td class="labelcell">Timeout:</td> |
| 291 | - <td><input type="text" name="timeout" size="3" value="<?php if ($timeout > 0) { echo $timeout; } ?>"/></td> |
|
| 291 | + <td><input type="text" name="timeout" size="3" value="<?php if ($timeout>0) { echo $timeout; } ?>"/></td> |
|
| 292 | 292 | <td class="labelcell">Protocol:</td> |
| 293 | 293 | <td><select name="protocol" onchange="switchssl(); switchauth(); swicthcainfo();"> |
| 294 | 294 | <option value="0"<?php if ($protocol == 0) { echo ' selected="selected"'; } ?>>HTTP 1.0</option> |