Browse files

Refactored isEmpty loop to be more readible.

  • Loading branch information...
1 parent d0a1b93 commit f471c909a89ddcb17de6b0ce28966596ea423f40 @roelvanduijnhoven committed Jan 14, 2013
Showing with 7 additions and 8 deletions.
  1. +7 −8 library/Zend/Authentication/Storage/Chain.php
View
15 library/Zend/Authentication/Storage/Chain.php
@@ -67,15 +67,14 @@ public function isEmpty()
if( $storage->isEmpty() )
{
$storageWithHigherPriority[] = $storage;
+ continue;
}
- else
- {
- $storageValue = $storage->read();
- foreach( $storageWithHigherPriority as $higherPriorityStorage )
- $higherPriorityStorage->write($storageValue);
-
- return false;
- }
+
+ $storageValue = $storage->read();
+ foreach( $storageWithHigherPriority as $higherPriorityStorage )
+ $higherPriorityStorage->write($storageValue);
+
+ return false;
}
return true;

0 comments on commit f471c90

Please sign in to comment.