@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | function plain_findstate($stateNo) |
| 28 | 28 | { |
| 29 | - if (isset(exampleMethods::$stateNames[$stateNo - 1])) { |
|
| 29 | + if (isset(exampleMethods::$stateNames[$stateNo - 1])) { |
|
| 30 | 30 | return exampleMethods::$stateNames[$stateNo - 1]; |
| 31 | 31 | } else { |
| 32 | 32 | // not, there so complain |
@@ -26,11 +26,11 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | function plain_findstate($stateNo) |
| 28 | 28 | { |
| 29 | - if (isset(exampleMethods::$stateNames[$stateNo - 1])) { |
|
| 30 | - return exampleMethods::$stateNames[$stateNo - 1]; |
|
| 29 | + if (isset(exampleMethods::$stateNames[$stateNo-1])) { |
|
| 30 | + return exampleMethods::$stateNames[$stateNo-1]; |
|
| 31 | 31 | } else { |
| 32 | 32 | // not, there so complain |
| 33 | - throw new Exception("I don't have a state for the index '" . $stateNo . "'", PhpXmlRpc\PhpXmlRpc::$xmlrpcerruser); |
|
| 33 | + throw new Exception("I don't have a state for the index '".$stateNo."'", PhpXmlRpc\PhpXmlRpc::$xmlrpcerruser); |
|
| 34 | 34 | } |
| 35 | 35 | } |
| 36 | 36 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | if ($req->getNumParams()) { |
| 70 | 70 | $p1 = $req->getParam(0); |
| 71 | 71 | if ($p1->kindOf() === 'scalar') { |
| 72 | - $errNum = (int)$p1->scalarVal(); |
|
| 72 | + $errNum = (int) $p1->scalarVal(); |
|
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | throw new Exception("it's just a test", $errNum); |
@@ -141,13 +141,13 @@ discard block |
||
| 141 | 141 | |
| 142 | 142 | $findstate10_sig = array( |
| 143 | 143 | /// @todo add a demo and test with closure usage |
| 144 | - "function" => function ($req) { return exampleMethods::findState($req); }, |
|
| 144 | + "function" => function($req) { return exampleMethods::findState($req); }, |
|
| 145 | 145 | "signature" => array(array(Value::$xmlrpcString, Value::$xmlrpcInt)), |
| 146 | - "docstring" => 'When passed an integer between 1 and 51 returns the name of a US state, where the integer is the ' . |
|
| 146 | + "docstring" => 'When passed an integer between 1 and 51 returns the name of a US state, where the integer is the '. |
|
| 147 | 147 | 'index of that state name in an alphabetic order.', |
| 148 | 148 | ); |
| 149 | 149 | |
| 150 | -$findstate11_sig = $wrapper->wrapPhpFunction(function ($stateNo) { return plain_findstate($stateNo); }); |
|
| 150 | +$findstate11_sig = $wrapper->wrapPhpFunction(function($stateNo) { return plain_findstate($stateNo); }); |
|
| 151 | 151 | |
| 152 | 152 | /// @todo do we really need a new instance ? |
| 153 | 153 | $c = new handlersContainer(); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | $namespaceSignatures = $wrapper->wrapPhpClass($c, array('prefix' => 'namespacetest.', 'replace_class_name' => true, 'method_filter' => '/^findState$/', 'method_type' => 'static')); |
| 158 | 158 | |
| 159 | -$returnObj_sig = $wrapper->wrapPhpFunction(array($c, 'returnObject'), '', array('encode_php_objs' => true)); |
|
| 159 | +$returnObj_sig = $wrapper->wrapPhpFunction(array($c, 'returnObject'), '', array('encode_php_objs' => true)); |
|
| 160 | 160 | |
| 161 | 161 | return array_merge( |
| 162 | 162 | array( |
@@ -8,5 +8,5 @@ |
||
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | // Use the custom class autoloader. These two lines are not needed when the phpxmlrpc library is installed using Composer |
| 11 | -include_once __DIR__ . '/../../src/Autoloader.php'; |
|
| 11 | +include_once __DIR__.'/../../src/Autoloader.php'; |
|
| 12 | 12 | PhpXmlRpc\Autoloader::register(); |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -require_once __DIR__ . "/_prepend.php"; |
|
| 2 | +require_once __DIR__."/_prepend.php"; |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * Demoing the charset conversion of the library: create a client class which uses data in the CP-1252 character set, |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | // Use the custom class autoloader. These two lines are not needed when the phpxmlrpc library is installed using Composer |
| 11 | -include_once __DIR__ . '/../../src/Autoloader.php'; |
|
| 11 | +include_once __DIR__.'/../../src/Autoloader.php'; |
|
| 12 | 12 | PhpXmlRpc\Autoloader::register(); |
| 13 | 13 | |
| 14 | 14 | // Let unit tests run against localhost, 'plain' demos against a known public server |
@@ -22,5 +22,5 @@ discard block |
||
| 22 | 22 | function output($text) |
| 23 | 23 | { |
| 24 | 24 | /// @todo we should only strip html tags, and let through all xml tags |
| 25 | - echo PHP_SAPI == 'cli' ? strip_tags(str_replace(array('<br/>','<br>'), "\n", $text)) : $text; |
|
| 25 | + echo PHP_SAPI == 'cli' ? strip_tags(str_replace(array('<br/>', '<br>'), "\n", $text)) : $text; |
|
| 26 | 26 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include_once __DIR__ . '/PolyfillTestCase.php'; |
|
| 3 | +include_once __DIR__.'/PolyfillTestCase.php'; |
|
| 4 | 4 | |
| 5 | 5 | use PhpXmlRpc\Helper\Charset; |
| 6 | 6 | use PhpXmlRpc\Helper\Http; |
@@ -38,9 +38,9 @@ discard block |
||
| 38 | 38 | $l = $h->getLogger(); |
| 39 | 39 | Http::setLogger($this); |
| 40 | 40 | |
| 41 | - $s = "HTTP/1.0 200 OK\r\n" . |
|
| 42 | - "Content-Type: unknown\r\n" . |
|
| 43 | - "\r\n" . |
|
| 41 | + $s = "HTTP/1.0 200 OK\r\n". |
|
| 42 | + "Content-Type: unknown\r\n". |
|
| 43 | + "\r\n". |
|
| 44 | 44 | "body"; |
| 45 | 45 | ob_start(); |
| 46 | 46 | $h->parseResponseHeaders($s, false, 1); |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include_once __DIR__ . '/WebTestCase.php'; |
|
| 3 | +include_once __DIR__.'/WebTestCase.php'; |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Tests for php files in the 'extras' directory. |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include_once __DIR__ . '/WebTestCase.php'; |
|
| 3 | +include_once __DIR__.'/WebTestCase.php'; |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Tests for the bundled debugger. |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | * @author JoakimLofgren |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | -include_once __DIR__ . '/PolyfillTestCase.php'; |
|
| 6 | +include_once __DIR__.'/PolyfillTestCase.php'; |
|
| 7 | 7 | |
| 8 | 8 | use PhpXmlRpc\Helper\Charset; |
| 9 | 9 | |
@@ -48,10 +48,10 @@ discard block |
||
| 48 | 48 | public function testUtf8ToLatin1All() |
| 49 | 49 | { |
| 50 | 50 | $latinString = "\n\r\t"; |
| 51 | - for($i = 32; $i < 127; $i++) { |
|
| 51 | + for ($i = 32; $i<127; $i++) { |
|
| 52 | 52 | $latinString .= chr($i); |
| 53 | 53 | } |
| 54 | - for($i = 160; $i < 256; $i++) { |
|
| 54 | + for ($i = 160; $i<256; $i++) { |
|
| 55 | 55 | $latinString .= chr($i); |
| 56 | 56 | } |
| 57 | 57 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -require_once __DIR__ . "/_prepend.php"; |
|
| 2 | +require_once __DIR__."/_prepend.php"; |
|
| 3 | 3 | |
| 4 | 4 | output('<html lang="en"> |
| 5 | 5 | <head><title>phpxmlrpc - Webservice wrapper demo</title></head> |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | $client->setOption(\PhpXmlRpc\Client::OPT_RETURN_TYPE, 'phpvals'); // let client give us back php values instead of xmlrpcvals |
| 21 | 21 | $resp = $client->send(new PhpXmlRpc\Request('system.listMethods')); |
| 22 | 22 | if ($resp->faultCode()) { |
| 23 | - output("<p>Server methods list could not be retrieved: error {$resp->faultCode()} '" . htmlspecialchars($resp->faultString()) . "'</p>\n"); |
|
| 23 | + output("<p>Server methods list could not be retrieved: error {$resp->faultCode()} '".htmlspecialchars($resp->faultString())."'</p>\n"); |
|
| 24 | 24 | } else { |
| 25 | 25 | output("<p>Server methods list retrieved, now wrapping it up...</p>\n<ul>\n"); |
| 26 | 26 | flush(); |
@@ -32,9 +32,9 @@ discard block |
||
| 32 | 32 | if ($methodName == 'examples.getStateName') { |
| 33 | 33 | $callable = $wrapper->wrapXmlrpcMethod($client, $methodName); |
| 34 | 34 | if ($callable) { |
| 35 | - output("<li>Remote server method " . htmlspecialchars($methodName) . " wrapped into php function</li>\n"); |
|
| 35 | + output("<li>Remote server method ".htmlspecialchars($methodName)." wrapped into php function</li>\n"); |
|
| 36 | 36 | } else { |
| 37 | - output("<li>Remote server method " . htmlspecialchars($methodName) . " could not be wrapped!</li>\n"); |
|
| 37 | + output("<li>Remote server method ".htmlspecialchars($methodName)." could not be wrapped!</li>\n"); |
|
| 38 | 38 | } |
| 39 | 39 | break; |
| 40 | 40 | } |