Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'zf2/develop' into zend-validator-bitwise
Browse files Browse the repository at this point in the history
  • Loading branch information
Corentin Larose committed Oct 22, 2013
149 parents 6e3bf5f + 0d32a70 + bb27ee5 + e8ecd1e + f2b29a0 + 5205046 + 257c166 + 3122c56 + a8eef4b + 736bf24 + f1bdd85 + 30d927d + 0b20126 + ef5cf6f + 2efe2a7 + 9c5c0a0 + fae5b14 + 1d8b0d4 + 0885ee4 + 31378a4 + 22dc55a + 4fe9653 + 0835021 + 26ee41a + be4158f + a1e2d7e + 4abdf38 + e59ea5a + fbff658 + 48d0341 + 401d180 + 4e95264 + 5431207 + a7a7974 + 7c3f597 + a50748b + 700cf3a + 1582c31 + 016f50c + 9852497 + 073b126 + bd99c5c + 56451bd + 8fe4cad + 18812d8 + 89590ab + 0f8f25b + c2a03a9 + 4c690cd + 52cb4e6 + f7ed984 + 1d190a2 + 3c5d19b + c3c849d + faa6e57 + ad46181 + 12a401e + 3738445 + 65aacba + bf5f5a3 + c2ac9c0 + 6d7cf99 + 1841b47 + f81171b + 5ffaadf + cd6d5f2 + a512601 + 926e71f + 1f29b3e + a75171a + 9a8e72f + 814716e + 88d9371 + 678232d + a0560e8 + 4ff045c + ac805a6 + 41f360c + 1939a3c + 730da5d + dd0a1b5 + 1bc1ed5 + cea3413 + f2b47df + 2b8aa6a + 42cb3fe + 46afe3b + ef4289e + f40a98a + 8c27e9d + 512d6ca + b1452f8 + 9f6e228 + cf96a5a + aa9ef86 + 04be01e + 93487ba + c640cb5 + ab2b436 + a876e82 + 01f54c9 + f0abecc + 920eae1 + db4f625 + f51678c + 5975f0e + e9d78fe + 03de5ee + d7320d7 + 16ff5c5 + f170b61 + b506606 + f6c7309 + 675c421 + 43220df + c076d41 + e9406c0 + bb1710e + 565433c + be0baa3 + 8d2dae7 + ba17210 + bf83129 + 40926a2 + a7690f0 + 4fbd64e + f1f095f + 5077dc6 + 7d6f60c + a5f3296 + e036825 + 337996c + 285fc46 + 277a8aa + 0103b22 + b163911 + 078c1c8 + ae78853 + 4290f30 + 77fe406 + 5022cc4 + 7b31b93 + 6bd2e48 + 7762647 + 40e1948 + 4d714f6 + 54f7675 + 31d69f7 + 0642de5 commit c179910
Show file tree
Hide file tree
Showing 48 changed files with 34 additions and 179 deletions.
4 changes: 2 additions & 2 deletions src/Storage/Adapter/MemcachedResourceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ protected function normalizeServer(& $server)

// array('host' => <host>[, 'port' => <port>[, 'weight' => <weight>]])
if (!isset($server[0]) && isset($server['host'])) {
$host = (string)$server['host'];
$host = (string) $server['host'];
$port = isset($server['port']) ? (int) $server['port'] : $port;
$weight = isset($server['weight']) ? (int) $server['weight'] : $weight;
}
Expand All @@ -513,7 +513,7 @@ protected function normalizeServer(& $server)
$query = null;
parse_str($server['query'], $query);
if (isset($query['weight'])) {
$weight = (int)$query['weight'];
$weight = (int) $query['weight'];
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Adapter/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ protected function internalGetItems(array & $normalizedKeys)
//combine the key => value pairs and remove all missing values
return array_filter(
array_combine($normalizedKeys, $results),
function($value) {
function ($value) {
return $value !== false;
}
);
Expand Down
4 changes: 2 additions & 2 deletions src/Storage/Adapter/RedisResourceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public function setDatabase($id, $database)
{
if (!$this->hasResource($id)) {
return $this->setResource($id, array(
'database' => (int)$database,
'database' => (int) $database,
));
}

Expand Down Expand Up @@ -533,7 +533,7 @@ public function getMajorVersion($id)
}

$resource = & $this->resources[$id];
return (int)$resource['version'];
return (int) $resource['version'];
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Storage/Adapter/XCacheOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function getNamespaceSeparator()
*/
public function setAdminUser($adminUser)
{
$adminUser = ($adminUser === null) ? null : (string)$adminUser;
$adminUser = ($adminUser === null) ? null : (string) $adminUser;
if ($this->adminUser !== $adminUser) {
$this->triggerOptionEvent('admin_user', $adminUser);
$this->adminUser = $adminUser;
Expand Down Expand Up @@ -126,7 +126,7 @@ public function getAdminAuth()
*/
public function setAdminPass($adminPass)
{
$adminPass = ($adminPass === null) ? null : (string)$adminPass;
$adminPass = ($adminPass === null) ? null : (string) $adminPass;
if ($this->adminPass !== $adminPass) {
$this->triggerOptionEvent('admin_pass', $adminPass);
$this->adminPass = $adminPass;
Expand Down
10 changes: 3 additions & 7 deletions test/Pattern/CallbackCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_Cache
*/

namespace ZendTest\Cache\Pattern;
Expand All @@ -24,11 +23,11 @@ class TestCallbackCache

public static function bar()
{
++self::$fooCounter;
++static::$fooCounter;
$args = func_get_args();

echo 'foobar_output('.implode(', ', $args) . ') : ' . self::$fooCounter;
return 'foobar_return('.implode(', ', $args) . ') : ' . self::$fooCounter;
echo 'foobar_output('.implode(', ', $args) . ') : ' . static::$fooCounter;
return 'foobar_return('.implode(', ', $args) . ') : ' . static::$fooCounter;
}

public static function emptyMethod() {}
Expand All @@ -53,9 +52,6 @@ function bar()
}

/**
* @category Zend
* @package Zend_Cache
* @subpackage UnitTests
* @group Zend_Cache
*/
class CallbackCacheTest extends CommonPatternTest
Expand Down
25 changes: 10 additions & 15 deletions test/Pattern/CaptureCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
* @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_Cache
*/

namespace ZendTest\Cache\Pattern;

use Zend\Cache;

/**
* @category Zend
* @package Zend_Cache
* @subpackage UnitTests
* @group Zend_Cache
*/
class CaptureCacheTest extends CommonPatternTest
Expand Down Expand Up @@ -137,18 +133,17 @@ public function testRemoveThrowsLogicExceptionOnMissingPublicDir()
public function testGetFilenameWithoutPublicDir()
{
$captureCache = new Cache\Pattern\CaptureCache();

$this->assertEquals('/index.html', $captureCache->getFilename('/'));
$this->assertEquals('/dir1/test', $captureCache->getFilename('/dir1/test'));
$this->assertEquals('/dir1/test.html', $captureCache->getFilename('/dir1/test.html'));
$this->assertEquals('/dir1/dir2/test.html', $captureCache->getFilename('/dir1/dir2/test.html'));
$this->assertEquals(str_replace('/', DIRECTORY_SEPARATOR, '/index.html'), $captureCache->getFilename('/'));
$this->assertEquals(str_replace('/', DIRECTORY_SEPARATOR, '/dir1/test'), $captureCache->getFilename('/dir1/test'));
$this->assertEquals(str_replace('/', DIRECTORY_SEPARATOR, '/dir1/test.html'), $captureCache->getFilename('/dir1/test.html'));
$this->assertEquals(str_replace('/', DIRECTORY_SEPARATOR, '/dir1/dir2/test.html'), $captureCache->getFilename('/dir1/dir2/test.html'));
}

public function testGetFilenameWithoutPublicDirAndNoPageId()
{
$_SERVER['REQUEST_URI'] = '/dir1/test.html';
$captureCache = new Cache\Pattern\CaptureCache();
$this->assertEquals('/dir1/test.html', $captureCache->getFilename());
$this->assertEquals(str_replace('/', DIRECTORY_SEPARATOR, '/dir1/test.html'), $captureCache->getFilename());
}

public function testGetFilenameWithPublicDir()
Expand All @@ -160,10 +155,10 @@ public function testGetFilenameWithPublicDir()
$captureCache = new Cache\Pattern\CaptureCache();
$captureCache->setOptions($options);

$this->assertEquals($this->_tmpCacheDir . '/index.html', $captureCache->getFilename('/'));
$this->assertEquals($this->_tmpCacheDir . '/dir1/test', $captureCache->getFilename('/dir1/test'));
$this->assertEquals($this->_tmpCacheDir . '/dir1/test.html', $captureCache->getFilename('/dir1/test.html'));
$this->assertEquals($this->_tmpCacheDir . '/dir1/dir2/test.html', $captureCache->getFilename('/dir1/dir2/test.html'));
$this->assertEquals($this->_tmpCacheDir . str_replace('/', DIRECTORY_SEPARATOR, '/index.html'), $captureCache->getFilename('/'));
$this->assertEquals($this->_tmpCacheDir . str_replace('/', DIRECTORY_SEPARATOR, '/dir1/test'), $captureCache->getFilename('/dir1/test'));
$this->assertEquals($this->_tmpCacheDir . str_replace('/', DIRECTORY_SEPARATOR, '/dir1/test.html'), $captureCache->getFilename('/dir1/test.html'));
$this->assertEquals($this->_tmpCacheDir . str_replace('/', DIRECTORY_SEPARATOR, '/dir1/dir2/test.html'), $captureCache->getFilename('/dir1/dir2/test.html'));
}

public function testGetFilenameWithPublicDirAndNoPageId()
Expand All @@ -176,6 +171,6 @@ public function testGetFilenameWithPublicDirAndNoPageId()
$captureCache = new Cache\Pattern\CaptureCache();
$captureCache->setOptions($options);

$this->assertEquals($this->_tmpCacheDir . '/dir1/test.html', $captureCache->getFilename());
$this->assertEquals($this->_tmpCacheDir . str_replace('/', DIRECTORY_SEPARATOR, '/dir1/test.html'), $captureCache->getFilename());
}
}
10 changes: 3 additions & 7 deletions test/Pattern/ClassCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_Cache
*/

namespace ZendTest\Cache\Pattern;
Expand All @@ -24,21 +23,18 @@ class TestClassCache

public static function bar()
{
++self::$fooCounter;
++static::$fooCounter;
$args = func_get_args();

echo 'foobar_output('.implode(', ', $args) . ') : ' . self::$fooCounter;
return 'foobar_return('.implode(', ', $args) . ') : ' . self::$fooCounter;
echo 'foobar_output('.implode(', ', $args) . ') : ' . static::$fooCounter;
return 'foobar_return('.implode(', ', $args) . ') : ' . static::$fooCounter;
}

public static function emptyMethod() {}

}

/**
* @category Zend
* @package Zend_Cache
* @subpackage UnitTests
* @group Zend_Cache
*/
class ClassCacheTest extends CommonPatternTest
Expand Down
4 changes: 0 additions & 4 deletions test/Pattern/CommonPatternTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
* @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_Cache
*/

namespace ZendTest\Cache\Pattern;

use Zend\Cache;

/**
* @category Zend
* @package Zend_Cache
* @subpackage UnitTests
* @group Zend_Cache
*/
class CommonPatternTest extends \PHPUnit_Framework_TestCase
Expand Down
10 changes: 3 additions & 7 deletions test/Pattern/ObjectCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_Cache
*/

namespace ZendTest\Cache\Pattern;
Expand All @@ -26,11 +25,11 @@ class TestObjectCache

public function bar()
{
++self::$fooCounter;
++static::$fooCounter;
$args = func_get_args();

echo 'foobar_output('.implode(', ', $args) . ') : ' . self::$fooCounter;
return 'foobar_return('.implode(', ', $args) . ') : ' . self::$fooCounter;
echo 'foobar_output('.implode(', ', $args) . ') : ' . static::$fooCounter;
return 'foobar_return('.implode(', ', $args) . ') : ' . static::$fooCounter;
}

public function __invoke()
Expand All @@ -43,9 +42,6 @@ public function emptyMethod() {}
}

/**
* @category Zend
* @package Zend_Cache
* @subpackage UnitTests
* @group Zend_Cache
*/
class ObjectCacheTest extends CommonPatternTest
Expand Down
4 changes: 0 additions & 4 deletions test/Pattern/OutputCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
* @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_Cache
*/

namespace ZendTest\Cache\Pattern;

use Zend\Cache;

/**
* @category Zend
* @package Zend_Cache
* @subpackage UnitTests
* @group Zend_Cache
*/
class OutputCacheTest extends CommonPatternTest
Expand Down
4 changes: 0 additions & 4 deletions test/PatternFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
* @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_Cache
*/

namespace ZendTest\Cache;

use Zend\Cache;

/**
* @category Zend
* @package Zend_Cache
* @subpackage UnitTests
* @group Zend_Cache
*/
class PatternFactoryTest extends \PHPUnit_Framework_TestCase
Expand Down
4 changes: 0 additions & 4 deletions test/Service/StorageCacheAbstractServiceFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_Cache
*/

namespace ZendTest\Cache\Service;
Expand All @@ -14,9 +13,6 @@
use Zend\ServiceManager\ServiceManager;

/**
* @category Zend
* @package Zend_Cache
* @subpackage UnitTests
* @group Zend_Cache
*/
class StorageCacheAbstractServiceFactoryTest extends \PHPUnit_Framework_TestCase
Expand Down
4 changes: 0 additions & 4 deletions test/Service/StorageCacheFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_Cache
*/

namespace ZendTest\Cache\Service;
Expand All @@ -14,9 +13,6 @@
use Zend\ServiceManager\ServiceManager;

/**
* @category Zend
* @package Zend_Cache
* @subpackage UnitTests
* @group Zend_Cache
*/
class StorageCacheFactoryTest extends \PHPUnit_Framework_TestCase
Expand Down
4 changes: 0 additions & 4 deletions test/Storage/Adapter/AbstractAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_Cache
*/

namespace ZendTest\Cache\Storage\Adapter;
Expand All @@ -14,9 +13,6 @@
use Zend\Cache\Exception;

/**
* @category Zend
* @package Zend_Cache
* @subpackage UnitTests
* @group Zend_Cache
*/
class AbstractAdapterTest extends \PHPUnit_Framework_TestCase
Expand Down
4 changes: 0 additions & 4 deletions test/Storage/Adapter/AbstractDbaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
* @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_Cache
*/

namespace ZendTest\Cache\Storage\Adapter;

use Zend\Cache;

/**
* @category Zend
* @package Zend_Cache
* @subpackage UnitTests
* @group Zend_Cache
*/
abstract class AbstractDbaTest extends CommonAdapterTest
Expand Down
4 changes: 0 additions & 4 deletions test/Storage/Adapter/AbstractZendServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_Cache
*/

namespace ZendTest\Cache\Storage\Adapter;
Expand All @@ -14,9 +13,6 @@
use Zend\Cache\Storage\Adapter\AbstractZendServer;

/**
* @category Zend
* @package Zend_Cache
* @subpackage UnitTests
* @group Zend_Cache
*/
class AbstractZendServerTest extends \PHPUnit_Framework_TestCase
Expand Down
4 changes: 0 additions & 4 deletions test/Storage/Adapter/ApcTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
* @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_Cache
*/

namespace ZendTest\Cache\Storage\Adapter;

use Zend\Cache;

/**
* @category Zend
* @package Zend_Cache
* @subpackage UnitTests
* @group Zend_Cache
*/
class ApcTest extends CommonAdapterTest
Expand Down

0 comments on commit c179910

Please sign in to comment.