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

Commit

Permalink
CS Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Slamdunk committed Nov 14, 2014
151 parents a5fb9cb + 02e14e6 + e24be06 + 1cd130f + 2f4d84a + c5055d9 + b5302e2 + 9969a8b + 83a796c + 7f06dd1 + 40e1948 + 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 + 0d32a70 + bb27ee5 + e8ecd1e + f2b29a0 + 5205046 + 257c166 + 3122c56 + a8eef4b + 736bf24 + f1bdd85 + 30d927d + 0b20126 + ef5cf6f + 2efe2a7 + 9c5c0a0 + b163911 + 078c1c8 + ae78853 + 4290f30 + 77fe406 + fb5d494 commit 10f31cd
Show file tree
Hide file tree
Showing 58 changed files with 22 additions and 86 deletions.
1 change: 0 additions & 1 deletion src/Pattern/CaptureCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ protected function createDirectoryStructure($pathname)
$err = ErrorHandler::stop();
throw new Exception\RuntimeException("chmod('{$pathname}', 0{$oct}) failed", 0, $err);
}

} else {
// build-in mkdir function sets permission together with current umask
// which doesn't work well on multo threaded webservers
Expand Down
3 changes: 1 addition & 2 deletions src/Storage/Adapter/AdapterOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*/
class AdapterOptions extends AbstractOptions
{

/**
* The adapter using these options
*
Expand Down Expand Up @@ -259,7 +258,7 @@ protected function normalizeTtl(&$ttl)
}

if ($ttl < 0) {
throw new Exception\InvalidArgumentException("TTL can't be negative");
throw new Exception\InvalidArgumentException("TTL can't be negative");
}
}
}
1 change: 0 additions & 1 deletion src/Storage/Adapter/ApcIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

class ApcIterator implements IteratorInterface
{

/**
* The apc storage instance
*
Expand Down
1 change: 0 additions & 1 deletion src/Storage/Adapter/Dba.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ public function flush()
}

if (file_exists($pathname)) {

// close the dba file before delete
// and reopen (create) on next use
$this->_close();
Expand Down
5 changes: 0 additions & 5 deletions src/Storage/Adapter/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class Filesystem extends AbstractAdapter implements
TaggableInterface,
TotalSpaceCapableInterface
{

/**
* Buffered total space in bytes
*
Expand Down Expand Up @@ -529,7 +528,6 @@ protected function internalGetItem(& $normalizedKey, & $success = null, & $casTo
}
$success = true;
return $data;

} catch (BaseException $e) {
$success = false;
throw $e;
Expand All @@ -548,7 +546,6 @@ protected function internalGetItems(array & $normalizedKeys)
$keys = $normalizedKeys; // Don't change argument passed by reference
$result = array();
while ($keys) {

// LOCK_NB if more than one items have to read
$nonBlocking = count($keys) > 1;
$wouldblock = null;
Expand Down Expand Up @@ -1426,7 +1423,6 @@ protected function prepareDirectoryStructure($file)
$err = ErrorHandler::stop();
throw new Exception\RuntimeException("chmod('{$pathname}', 0{$oct}) failed", 0, $err);
}

} else {
// build-in mkdir function sets permission together with current umask
// which doesn't work well on multo threaded webservers
Expand Down Expand Up @@ -1503,7 +1499,6 @@ protected function putFileContent($file, $data, $nonBlocking = false, & $wouldbl

// if locking and non blocking is enabled -> file_put_contents can't used
if ($locking && $nonBlocking) {

$umask = ($umask !== false) ? umask($umask) : false;

$fp = fopen($file, 'cb');
Expand Down
1 change: 0 additions & 1 deletion src/Storage/Adapter/FilesystemIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

class FilesystemIterator implements IteratorInterface
{

/**
* The Filesystem storage instance
*
Expand Down
1 change: 0 additions & 1 deletion src/Storage/Adapter/FilesystemOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
class FilesystemOptions extends AdapterOptions
{

/**
* Directory to store cache files
*
Expand Down
1 change: 0 additions & 1 deletion src/Storage/Adapter/KeyListIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

class KeyListIterator implements IteratorInterface, Countable
{

/**
* The storage instance
*
Expand Down
2 changes: 0 additions & 2 deletions src/Storage/Adapter/MemcachedResourceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
class MemcachedResourceManager
{

/**
* Registered resources
*
Expand Down Expand Up @@ -80,7 +79,6 @@ protected function normalizeServer(&$server)
$port = isset($server['port']) ? (int) $server['port'] : $port;
$weight = isset($server['weight']) ? (int) $server['weight'] : $weight;
}

} else {
// parse server from URI host{:?port}{?weight}
$server = trim($server);
Expand Down
3 changes: 0 additions & 3 deletions src/Storage/Adapter/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class Redis extends AbstractAdapter implements
FlushableInterface,
TotalSpaceCapableInterface
{

/**
* Has this instance be initialized
*
Expand Down Expand Up @@ -271,7 +270,6 @@ protected function internalSetItems(array & $normalizedKeyValuePairs)
} else {
$success = $redis->mSet($namespacedKeyValuePairs);
}

} catch (RedisResourceException $e) {
throw new Exception\RuntimeException($redis->getLastError(), $e->getCode(), $e);
}
Expand Down Expand Up @@ -387,7 +385,6 @@ public function getTotalSpace()
}

return $info['used_memory'];

}

/* status */
Expand Down
1 change: 0 additions & 1 deletion src/Storage/Adapter/RedisResourceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ protected function normalizeServer(&$server)
$port = isset($server['port']) ? (int) $server['port'] : $port;
$timeout = isset($server['timeout']) ? (int) $server['timeout'] : $timeout;
}

} else {
// parse server from URI host{:?port}
$server = trim($server);
Expand Down
1 change: 0 additions & 1 deletion src/Storage/Adapter/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class Session extends AbstractAdapter implements
FlushableInterface,
IterableInterface
{

/**
* Set options.
*
Expand Down
1 change: 0 additions & 1 deletion src/Storage/Adapter/WinCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class WinCache extends AbstractAdapter implements
FlushableInterface,
TotalSpaceCapableInterface
{

/**
* Constructor
*
Expand Down
4 changes: 0 additions & 4 deletions src/Storage/Adapter/XCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class XCache extends AbstractAdapter implements
IterableInterface,
TotalSpaceCapableInterface
{

/**
* Backup HTTP authentication properties of $_SERVER array
*
Expand Down Expand Up @@ -221,7 +220,6 @@ public function flush()
*/
public function getIterator()
{

$options = $this->getOptions();
$namespace = $options->getNamespace();
$keys = array();
Expand All @@ -237,7 +235,6 @@ public function getIterator()
}
}
} else {

$prefix = $namespace . $options->getNamespaceSeparator();
$prefixL = strlen($prefix);

Expand Down Expand Up @@ -313,7 +310,6 @@ protected function internalGetMetadata(& $normalizedKey)
$internalKey = $prefix . $normalizedKey;

if (xcache_isset($internalKey)) {

$this->initAdminAuth();
$cnt = xcache_count(XC_TYPE_VAR);
for ($i=0; $i < $cnt; $i++) {
Expand Down
1 change: 0 additions & 1 deletion src/Storage/Adapter/ZendServerDisk.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class ZendServerDisk extends AbstractZendServer implements
FlushableInterface,
TotalSpaceCapableInterface
{

/**
* Buffered total space in bytes
*
Expand Down
1 change: 0 additions & 1 deletion src/Storage/Adapter/ZendServerShm.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class ZendServerShm extends AbstractZendServer implements
FlushableInterface,
TotalSpaceCapableInterface
{

/**
* Constructor
*
Expand Down
1 change: 0 additions & 1 deletion src/Storage/IteratorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

interface IteratorInterface extends Iterator
{

const CURRENT_AS_SELF = 0;
const CURRENT_AS_KEY = 1;
const CURRENT_AS_VALUE = 2;
Expand Down
6 changes: 3 additions & 3 deletions test/Pattern/CallbackCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ public static function bar()
return 'foobar_return('.implode(', ', $args) . ') : ' . static::$fooCounter;
}

public static function emptyMethod() {}

public static function emptyMethod()
{
}
}

class FailableCallback
Expand All @@ -56,7 +57,6 @@ function bar()
*/
class CallbackCacheTest extends CommonPatternTest
{

/**
* @var \Zend\Cache\Storage\StorageInterface
*/
Expand Down
1 change: 0 additions & 1 deletion test/Pattern/CaptureCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
class CaptureCacheTest extends CommonPatternTest
{

protected $_tmpCacheDir;
protected $_umask;
protected $_bufferedServerSuperGlobal;
Expand Down
6 changes: 3 additions & 3 deletions test/Pattern/ClassCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ public static function bar()
return 'foobar_return('.implode(', ', $args) . ') : ' . static::$fooCounter;
}

public static function emptyMethod() {}

public static function emptyMethod()
{
}
}

/**
* @group Zend_Cache
*/
class ClassCacheTest extends CommonPatternTest
{

/**
* @var \Zend\Cache\Storage\StorageInterface
*/
Expand Down
1 change: 0 additions & 1 deletion test/Pattern/CommonPatternTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
class CommonPatternTest extends \PHPUnit_Framework_TestCase
{

/**
* @var \Zend\Cache\Pattern\PatternInterface
*/
Expand Down
6 changes: 3 additions & 3 deletions test/Pattern/ObjectCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ public function __invoke()
return call_user_func_array(array($this, 'bar'), func_get_args());
}

public function emptyMethod() {}

public function emptyMethod()
{
}
}

/**
* @group Zend_Cache
*/
class ObjectCacheTest extends CommonPatternTest
{

/**
* @var \Zend\Cache\Storage\StorageInterface
*/
Expand Down
1 change: 0 additions & 1 deletion test/Pattern/OutputCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
class OutputCacheTest extends CommonPatternTest
{

/**
* @var \Zend\Cache\Storage\StorageInterface
*/
Expand Down
1 change: 0 additions & 1 deletion test/PatternFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
class PatternFactoryTest extends \PHPUnit_Framework_TestCase
{

public function setUp()
{
Cache\PatternFactory::resetPluginManager();
Expand Down
1 change: 0 additions & 1 deletion test/Storage/Adapter/AbstractAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
class AbstractAdapterTest extends \PHPUnit_Framework_TestCase
{

/**
* Mock of the abstract storage adapter
*
Expand Down
1 change: 0 additions & 1 deletion test/Storage/Adapter/AbstractDbaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
abstract class AbstractDbaTest extends CommonAdapterTest
{

protected $handler;
protected $temporaryDbaFile;

Expand Down
1 change: 0 additions & 1 deletion test/Storage/Adapter/AbstractZendServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
class AbstractZendServerTest extends \PHPUnit_Framework_TestCase
{

public function setUp()
{
$this->_options = new AdapterOptions();
Expand Down
1 change: 0 additions & 1 deletion test/Storage/Adapter/ApcTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
class ApcTest extends CommonAdapterTest
{

/**
* Restore 'apc.use_request_time'
*
Expand Down
1 change: 0 additions & 1 deletion test/Storage/Adapter/BlackHoleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
*/
class BlackHoleTest extends \PHPUnit_Framework_TestCase
{

/**
* The storage adapter
*
Expand Down
13 changes: 6 additions & 7 deletions test/Storage/Adapter/CommonAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
*/
abstract class CommonAdapterTest extends \PHPUnit_Framework_TestCase
{

/**
* The storage adapter
*
Expand Down Expand Up @@ -751,9 +750,9 @@ public function testCheckAndSetItem()

public function testIncrementItem()
{
$this->assertTrue($this->_storage->setItem('counter', 10));
$this->assertEquals(15, $this->_storage->incrementItem('counter', 5));
$this->assertEquals(15, $this->_storage->getItem('counter'));
$this->assertTrue($this->_storage->setItem('counter', 10));
$this->assertEquals(15, $this->_storage->incrementItem('counter', 5));
$this->assertEquals(15, $this->_storage->getItem('counter'));
}

public function testIncrementItemInitialValue()
Expand Down Expand Up @@ -798,9 +797,9 @@ public function testIncrementItemsReturnsEmptyArrayIfNonWritable()

public function testDecrementItem()
{
$this->assertTrue($this->_storage->setItem('counter', 30));
$this->assertEquals(25, $this->_storage->decrementItem('counter', 5));
$this->assertEquals(25, $this->_storage->getItem('counter'));
$this->assertTrue($this->_storage->setItem('counter', 30));
$this->assertEquals(25, $this->_storage->decrementItem('counter', 5));
$this->assertEquals(25, $this->_storage->getItem('counter'));
}

public function testDecrementItemInitialValue()
Expand Down
1 change: 0 additions & 1 deletion test/Storage/Adapter/DbaDb2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace ZendTest\Cache\Storage\Adapter;

use Zend\Cache;

/**
* @group Zend_Cache
Expand Down
Loading

0 comments on commit 10f31cd

Please sign in to comment.