diff --git a/src/Server.php b/src/Server.php index 9746184..6238db7 100644 --- a/src/Server.php +++ b/src/Server.php @@ -598,7 +598,7 @@ protected static function isSubclassOf($className, $type) if (is_subclass_of($className, $type)) { return true; } - if (version_compare(PHP_VERSION, '5.3.7', '>=')) { + if (PHP_VERSION_ID >= 50307) { return false; } if (!interface_exists($type)) { diff --git a/src/Value/AbstractCollection.php b/src/Value/AbstractCollection.php index a65eb03..a6fba7f 100644 --- a/src/Value/AbstractCollection.php +++ b/src/Value/AbstractCollection.php @@ -21,7 +21,7 @@ abstract class AbstractCollection extends AbstractValue */ public function __construct($value) { - $values = (array)$value; // Make sure that the value is an array + $values = (array) $value; // Make sure that the value is an array foreach ($values as $key => $value) { // If the elements of the given array are not Zend\XmlRpc\Value objects, // we need to convert them as such (using auto-detection from PHP value) @@ -40,7 +40,7 @@ public function __construct($value) */ public function getValue() { - $values = (array)$this->value; + $values = (array) $this->value; foreach ($values as $key => $value) { $values[$key] = $value->getValue(); } diff --git a/test/BigIntegerValueTest.php b/test/BigIntegerValueTest.php index 70e5fcc..9ebb5a5 100644 --- a/test/BigIntegerValueTest.php +++ b/test/BigIntegerValueTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace ZendTest\XmlRpc; @@ -16,9 +15,6 @@ use Zend\XmlRpc\Generator\GeneratorInterface as Generator; /** - * @category Zend - * @package Zend_XmlRpc - * @subpackage UnitTests * @group Zend_XmlRpc */ class BigIntegerValueTest extends \PHPUnit_Framework_TestCase diff --git a/test/ClientTest.php b/test/ClientTest.php index 60f804d..5d7d3c7 100644 --- a/test/ClientTest.php +++ b/test/ClientTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace ZendTest\XmlRpc; @@ -19,9 +18,6 @@ use Zend\XmlRpc; /** - * @category Zend - * @package Zend_XmlRpc - * @subpackage UnitTests * @group Zend_XmlRpc */ class ClientTest extends \PHPUnit_Framework_TestCase diff --git a/test/FaultTest.php b/test/FaultTest.php index 59bc1ce..1361c29 100644 --- a/test/FaultTest.php +++ b/test/FaultTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace ZendTest\XmlRpc; @@ -14,9 +13,6 @@ use Zend\XmlRpc; /** - * @category Zend - * @package Zend_XmlRpc - * @subpackage UnitTests * @group Zend_XmlRpc */ class FaultTest extends \PHPUnit_Framework_TestCase diff --git a/test/GeneratorTest.php b/test/GeneratorTest.php index c7e0c15..240ffe4 100644 --- a/test/GeneratorTest.php +++ b/test/GeneratorTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace ZendTest\XmlRpc; @@ -13,9 +12,6 @@ use Zend\XmlRpc\Generator\GeneratorInterface as Generator; /** - * @category Zend - * @package Zend_XmlRpc - * @subpackage UnitTests * @group Zend_XmlRpc */ class GeneratorTest extends \PHPUnit_Framework_TestCase @@ -65,7 +61,7 @@ public function testFlushingGeneratorFlushesEverything(Generator $generator) $generator->openElement('test')->closeElement('test'); $this->assertXml('', $generator); $this->assertContains('', $generator->flush()); - $this->assertSame('', (string)$generator); + $this->assertSame('', (string) $generator); } /** diff --git a/test/Request/HttpTest.php b/test/Request/HttpTest.php index ab833bc..9bccd13 100644 --- a/test/Request/HttpTest.php +++ b/test/Request/HttpTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace ZendTest\XmlRpc\Request; @@ -14,9 +13,6 @@ use ZendTest\AllTests\StreamWrapper\PHPInput; /** - * @category Zend - * @package Zend_XmlRpc - * @subpackage UnitTests * @group Zend_XmlRpc */ class HTTPTest extends \PHPUnit_Framework_TestCase diff --git a/test/RequestTest.php b/test/RequestTest.php index 3aa2f8f..558ecf0 100644 --- a/test/RequestTest.php +++ b/test/RequestTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace ZendTest\XmlRpc; @@ -15,9 +14,6 @@ use Zend\XmlRpc\Value; /** - * @category Zend - * @package Zend_XmlRpc - * @subpackage UnitTests * @group Zend_XmlRpc */ class RequestTest extends \PHPUnit_Framework_TestCase diff --git a/test/ResponseTest.php b/test/ResponseTest.php index 0e33233..67393d9 100644 --- a/test/ResponseTest.php +++ b/test/ResponseTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace ZendTest\XmlRpc; @@ -14,9 +13,6 @@ use Zend\XmlRpc\AbstractValue; /** - * @category Zend - * @package Zend_XmlRpc - * @subpackage UnitTests * @group Zend_XmlRpc */ class ResponseTest extends \PHPUnit_Framework_TestCase diff --git a/test/Server/CacheTest.php b/test/Server/CacheTest.php index c05793d..4308096 100644 --- a/test/Server/CacheTest.php +++ b/test/Server/CacheTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace ZendTest\XmlRpc\Server; @@ -13,9 +12,6 @@ use Zend\XmlRpc\Server; /** - * @category Zend - * @package Zend_XmlRpc - * @subpackage UnitTests * @group Zend_XmlRpc */ class CacheTest extends \PHPUnit_Framework_TestCase diff --git a/test/Server/FaultTest.php b/test/Server/FaultTest.php index 61acd0b..cae34ec 100644 --- a/test/Server/FaultTest.php +++ b/test/Server/FaultTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace ZendTest\XmlRpc\Server; @@ -13,9 +12,6 @@ use Zend\XmlRpc\Server; /** - * @category Zend - * @package Zend_XmlRpc - * @subpackage UnitTests * @group Zend_XmlRpc */ class FaultTest extends \PHPUnit_Framework_TestCase @@ -207,6 +203,7 @@ public function test__toString() $e = new Server\Exception\RuntimeException('Testing fault', 411); $fault = Server\Fault::getInstance($e); + $fault->setEncoding('UTF-8'); $this->assertEquals(trim($xml), trim($fault->__toString())); } @@ -229,11 +226,11 @@ private function __construct() public static function getInstance() { - if (!self::$_instance) { - self::$_instance = new self(); + if (!static::$_instance) { + static::$_instance = new self(); } - return self::$_instance; + return static::$_instance; } public static function observe(Server\Fault $fault) diff --git a/test/ServerTest.php b/test/ServerTest.php index a9bcf04..45dfbbf 100644 --- a/test/ServerTest.php +++ b/test/ServerTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace ZendTest\XmlRpc; @@ -19,9 +18,6 @@ use Zend\XmlRpc; /** - * @category Zend - * @package Zend_XmlRpc - * @subpackage UnitTests * @group Zend_XmlRpc */ class ServerTest extends \PHPUnit_Framework_TestCase diff --git a/test/TestProvider.php b/test/TestProvider.php index 47c2e6b..6239179 100644 --- a/test/TestProvider.php +++ b/test/TestProvider.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace ZendTest\XmlRpc; diff --git a/test/ValueTest.php b/test/ValueTest.php index 24c6356..7ecb04e 100644 --- a/test/ValueTest.php +++ b/test/ValueTest.php @@ -5,7 +5,6 @@ * @link http://github.com/zendframework/zf2 for the canonical source repository * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace ZendTest\XmlRpc; @@ -19,9 +18,6 @@ /** * Test case for Value * - * @category Zend - * @package Zend_XmlRpc - * @subpackage UnitTests * @group Zend_XmlRpc */ class ValueTest extends \PHPUnit_Framework_TestCase