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

Commit

Permalink
Merge branch 'cs/zendframework/zendframework#6872-php-cs-fixer-automa…
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Nov 14, 2014
2 parents 9ae6165 + 10f31cd commit 5bbfdcb
Show file tree
Hide file tree
Showing 58 changed files with 22 additions and 85 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 @@ -24,7 +24,6 @@ class Redis extends AbstractAdapter implements
FlushableInterface,
TotalSpaceCapableInterface
{

/**
* Has this instance be initialized
*
Expand Down Expand Up @@ -273,7 +272,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 @@ -415,7 +413,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
12 changes: 6 additions & 6 deletions test/Storage/Adapter/CommonAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -755,9 +755,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 @@ -802,9 +802,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
1 change: 0 additions & 1 deletion test/Storage/Adapter/DbaDb3Test.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 5bbfdcb

Please sign in to comment.