Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

File tree

7 files changed

+27
-24
lines changed

7 files changed

+27
-24
lines changed

src/AbstractValue.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,7 @@ protected static function _phpVarToNativeXmlRpc($value)
290290
}
291291
}
292292

293-
switch (self::getXmlRpcTypeByValue($value))
294-
{
293+
switch (self::getXmlRpcTypeByValue($value)) {
295294
case self::XMLRPC_TYPE_DATETIME:
296295
return new Value\DateTime($value);
297296

src/Generator/AbstractGenerator.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct($encoding = 'UTF-8')
3636

3737
/**
3838
* Initialize internal objects
39-
*
39+
*
4040
* @return void
4141
*/
4242
abstract protected function _init();
@@ -45,7 +45,7 @@ abstract protected function _init();
4545
* Start XML element
4646
*
4747
* Method opens a new XML element with an element name and an optional value
48-
*
48+
*
4949
* @param string $name XML tag name
5050
* @param string $value Optional value of the XML tag
5151
* @return AbstractGenerator Fluent interface
@@ -77,7 +77,7 @@ public function closeElement($name)
7777

7878
/**
7979
* Return encoding
80-
*
80+
*
8181
* @return string
8282
*/
8383
public function getEncoding()
@@ -87,8 +87,8 @@ public function getEncoding()
8787

8888
/**
8989
* Set XML encoding
90-
*
91-
* @param string $encoding
90+
*
91+
* @param string $encoding
9292
* @return AbstractGenerator
9393
*/
9494
public function setEncoding($encoding)
@@ -146,7 +146,7 @@ abstract protected function _writeTextData($text);
146146

147147
/**
148148
* End XML element
149-
*
149+
*
150150
* @param string $name
151151
*/
152152
abstract protected function _closeElement($name);

test/ClientTest.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -649,13 +649,13 @@ public function testHandlesLeadingOrTrailingWhitespaceInChunkedResponseProperly(
649649
$baseUri = "http://foo:80";
650650
$this->httpAdapter = new Adapter\Test();
651651
$this->httpClient = new Http\Client(null, array('adapter' => $this->httpAdapter));
652-
652+
653653
$respBody = file_get_contents(dirname(__FILE__) . "/_files/ZF1897-response-chunked.txt");
654654
$this->httpAdapter->setResponse($respBody);
655655

656656
$this->xmlrpcClient = new Client($baseUri);
657657
$this->xmlrpcClient->setHttpClient($this->httpClient);
658-
658+
659659
$this->assertEquals('FOO', $this->xmlrpcClient->call('foo'));
660660
}
661661

@@ -713,8 +713,10 @@ public function mockHttpClient()
713713
}
714714

715715
/** related to ZF-8478 */
716-
class PythonSimpleXMLRPCServerWithUnsupportedIntrospection extends Client\ServerProxy {
717-
public function __call($method, $args) {
716+
class PythonSimpleXMLRPCServerWithUnsupportedIntrospection extends Client\ServerProxy
717+
{
718+
public function __call($method, $args)
719+
{
718720
if ($method == 'methodSignature') {
719721
return 'signatures not supported';
720722
}
@@ -723,8 +725,10 @@ public function __call($method, $args) {
723725
}
724726

725727
/** related to ZF-8478 */
726-
class TestClient extends Client {
727-
public function getProxy($namespace = '') {
728+
class TestClient extends Client
729+
{
730+
public function getProxy($namespace = '')
731+
{
728732
if (empty($this->_proxyCache[$namespace])) {
729733
$this->_proxyCache[$namespace] = new PythonSimpleXMLRPCServerWithUnsupportedIntrospection($this, $namespace);
730734
}

test/FaultTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,19 +159,19 @@ public function testLoadXmlThrowsExceptionOnInvalidInput2()
159159
$this->setExpectedException('Zend\XmlRpc\Exception\InvalidArgumentException', 'Invalid fault structure');
160160
$this->assertFalse($this->_fault->loadXml('<methodResponse><fault/></methodResponse>'));
161161
}
162-
162+
163163
public function testLoadXmlThrowsExceptionOnInvalidInput3()
164164
{
165165
$this->setExpectedException('Zend\XmlRpc\Exception\InvalidArgumentException', 'Invalid fault structure');
166166
$this->_fault->loadXml('<methodResponse><fault/></methodResponse>');
167167
}
168-
168+
169169
public function testLoadXmlThrowsExceptionOnInvalidInput4()
170170
{
171171
$this->setExpectedException('Zend\XmlRpc\Exception\InvalidArgumentException', 'Fault code and string required');
172172
$this->_fault->loadXml('<methodResponse><fault><value><struct/></value></fault></methodResponse>');
173173
}
174-
174+
175175
/**
176176
* Zend_XmlRpc_Fault::isFault() test
177177
*/

test/RequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function testLoadXml()
170170

171171
$xml = $dom->saveXml();
172172

173-
173+
174174
$parsed = $this->_request->loadXml($xml);
175175
$this->assertTrue($parsed, $xml);
176176

test/ResponseTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,27 +212,27 @@ public function testSetGetEncoding()
212212
public function testLoadXmlCreatesFaultWithMissingNodes()
213213
{
214214
$sxl = new \SimpleXMLElement('<?xml version="1.0"?><methodResponse><params><param>foo</param></params></methodResponse>');
215-
215+
216216
$this->assertFalse($this->_response->loadXml($sxl->asXML()));
217217
$this->assertTrue($this->_response->isFault());
218218
$fault = $this->_response->getFault();
219219
$this->assertEquals(653, $fault->getCode());
220220
}
221-
221+
222222
public function testLoadXmlCreatesFaultWithMissingNodes2()
223223
{
224224
$sxl = new \SimpleXMLElement('<?xml version="1.0"?><methodResponse><params>foo</params></methodResponse>');
225-
225+
226226
$this->assertFalse($this->_response->loadXml($sxl->asXML()));
227227
$this->assertTrue($this->_response->isFault());
228228
$fault = $this->_response->getFault();
229229
$this->assertEquals(653, $fault->getCode());
230230
}
231-
231+
232232
public function testLoadXmlThrowsExceptionWithMissingNodes3()
233233
{
234234
$sxl = new \SimpleXMLElement('<?xml version="1.0"?><methodResponse><bar>foo</bar></methodResponse>');
235-
235+
236236
$this->assertFalse($this->_response->loadXml($sxl->asXML()));
237237
$this->assertTrue($this->_response->isFault());
238238
$fault = $this->_response->getFault();

test/ValueTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ public function testMarshalDateTimeFromNativeStringProducesIsoOutput()
583583

584584
public function testMarshalDateTimeFromInvalidString()
585585
{
586-
$this->setExpectedException('Zend\XmlRpc\Exception\ValueException',
586+
$this->setExpectedException('Zend\XmlRpc\Exception\ValueException',
587587
"The timezone could not be found in the database");
588588
AbstractValue::getXmlRpcValue('foobarbaz', AbstractValue::XMLRPC_TYPE_DATETIME);
589589
}

0 commit comments

Comments
 (0)