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

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'cs/zendframework/zendframework#6969-dead-code-removal' …
Browse files Browse the repository at this point in the history
…into develop

Close zendframework/zendframework#6969
Ocramius committed Dec 8, 2014
3 parents cd9d502 + 2137842 + 9202b55 commit 201b283
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/AbstractContainer.php
Original file line number Diff line number Diff line change
@@ -528,7 +528,7 @@ public function setExpirationSeconds($ttl, $vars = null)

// Map item keys => timestamp
$expires = array_flip($expires);
$expires = array_map(function ($value) use ($ts) {
$expires = array_map(function () use ($ts) {
return $ts;
}, $expires);

@@ -579,7 +579,7 @@ public function setExpirationHops($hops, $vars = null)

// Map item keys => timestamp
$expires = array_flip($expires);
$expires = array_map(function ($value) use ($hops, $ts) {
$expires = array_map(function () use ($hops, $ts) {
return array('hops' => $hops, 'ts' => $ts);
}, $expires);

2 changes: 1 addition & 1 deletion src/SaveHandler/DbTableGateway.php
Original file line number Diff line number Diff line change
@@ -128,7 +128,7 @@ public function write($id, $data)
$this->options->getNameColumn() => $this->sessionName,
));

if ($row = $rows->current()) {
if ($rows->current()) {
return (bool) $this->tableGateway->update($data, array(
$this->options->getIdColumn() => $id,
$this->options->getNameColumn() => $this->sessionName,
3 changes: 0 additions & 3 deletions src/Storage/Factory.php
Original file line number Diff line number Diff line change
@@ -60,14 +60,11 @@ public static function factory($type, $options = array())
switch (true) {
case (in_array('Zend\Session\Storage\AbstractSessionArrayStorage', class_parents($type))):
return static::createSessionArrayStorage($type, $options);
break;
case ($type === 'Zend\Session\Storage\ArrayStorage'):
case (in_array('Zend\Session\Storage\ArrayStorage', class_parents($type))):
return static::createArrayStorage($type, $options);
break;
case (in_array('Zend\Session\Storage\StorageInterface', class_implements($type))):
return new $type($options);
break;
default:
throw new Exception\InvalidArgumentException(sprintf(
'Unrecognized type "%s" provided; expects a class implementing %s\StorageInterface',

0 comments on commit 201b283

Please sign in to comment.