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

Commit

Permalink
Merge 6c3b0cb into 2b394bc
Browse files Browse the repository at this point in the history
  • Loading branch information
micheh committed Sep 15, 2012
2 parents 2b394bc + 6c3b0cb commit 32da576
Show file tree
Hide file tree
Showing 21 changed files with 14 additions and 31 deletions.
2 changes: 1 addition & 1 deletion library/Zend/Authentication/Adapter/Ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public function authenticate()
/* Iterate through each server and try to authenticate the supplied
* credentials against it.
*/
foreach ($this->options as $name => $options) {
foreach ($this->options as $options) {

if (!is_array($options)) {
throw new Exception\InvalidArgumentException('Adapter options array not an array');
Expand Down
1 change: 0 additions & 1 deletion library/Zend/Cache/Storage/Adapter/Apc.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ public function getIterator()
$options = $this->getOptions();
$prefix = $options->getNamespace() . $options->getNamespaceSeparator();
$pattern = '/^' . preg_quote($prefix, '/') . '/';
$format = 0;

$baseIt = new BaseApcIterator('user', $pattern, 0, 1, \APC_LIST_ACTIVE);
return new ApcIterator($this, $baseIt, $prefix);
Expand Down
8 changes: 0 additions & 8 deletions library/Zend/Cache/Storage/Adapter/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ public function clearByNamespace($namespace)
. str_repeat(\DIRECTORY_SEPARATOR . $nsPrefix . '*', $options->getDirLevel())
. \DIRECTORY_SEPARATOR . $nsPrefix . '*';
$glob = new GlobIterator($path, $flags);
$time = time();
$ttl = $options->getTtl();

ErrorHandler::start();
foreach ($glob as $pathname) {
Expand Down Expand Up @@ -227,8 +225,6 @@ public function clearByPrefix($prefix)
. str_repeat(\DIRECTORY_SEPARATOR . $nsPrefix . '*', $options->getDirLevel())
. \DIRECTORY_SEPARATOR . $nsPrefix . $prefix . '*';
$glob = new GlobIterator($path, $flags);
$time = time();
$ttl = $options->getTtl();

ErrorHandler::start();
foreach ($glob as $pathname) {
Expand Down Expand Up @@ -317,8 +313,6 @@ public function clearByTags(array $tags, $disjunction = false)
. str_repeat(\DIRECTORY_SEPARATOR . $prefix . '*', $options->getDirLevel())
. \DIRECTORY_SEPARATOR . $prefix . '*.tag';
$glob = new GlobIterator($path, $flags);
$time = time();
$ttl = $options->getTtl();

foreach ($glob as $pathname) {
$diff = array_diff($tags, explode("\n", $this->getFileContent($pathname)));
Expand Down Expand Up @@ -884,7 +878,6 @@ public function replaceItems(array $keyValuePairs)
*/
protected function internalSetItem(& $normalizedKey, & $value)
{
$options = $this->getOptions();
$filespec = $this->getFileSpec($normalizedKey);
$this->prepareDirectoryStructure($filespec);

Expand All @@ -903,7 +896,6 @@ protected function internalSetItem(& $normalizedKey, & $value)
*/
protected function internalSetItems(array & $normalizedKeyValuePairs)
{
$baseOptions = $this->getOptions();
$oldUmask = null;

// create an associated array of files and contents to write
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Cache/Storage/Adapter/Memcached.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ protected function internalGetMetadatas(array & $normalizedKeys)
throw $this->getExceptionByResultCode($this->memcached->getResultCode());
}

foreach ($result as $key => & $value) {
foreach ($result as & $value) {
$value = array();
}

Expand Down
1 change: 0 additions & 1 deletion library/Zend/Cache/Storage/Plugin/Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ public function onIncrementItemsPre(Event $event)
}

$failedKeys = $storage->setItems($keyValuePairs);
$result = array();
foreach ($failedKeys as $failedKey) {
unset($keyValuePairs[$failedKey]);
}
Expand Down
1 change: 0 additions & 1 deletion library/Zend/Feed/PubSubHubbub/HttpResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public function sendHeaders()
}
if (!$httpCodeSent) {
header('HTTP/1.1 ' . $this->statusCode);
$httpCodeSent = true;
}
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/File/Transfer/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ public function isValid($files = null)
$translator = $this->getTranslator();
$this->messages = array();
$break = false;
foreach ($check as $key => $content) {
foreach ($check as $content) {
if (array_key_exists('validators', $content) &&
in_array('Zend\Validator\File\Count', $content['validators'])) {
$validator = $this->validators['Zend\Validator\File\Count'];
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Filter/Encrypt/Openssl.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public function decrypt($value)
throw new Exception\RuntimeException('Please give an envelope key for decryption with Openssl');
}

foreach ($this->keys['private'] as $key => $cert) {
foreach ($this->keys['private'] as $cert) {
$keys = openssl_pkey_get_private($cert, $this->getPassphrase());
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Http/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ protected function prepareBody()
}

// Encode files
foreach ($this->getRequest()->getFiles()->toArray() as $key => $file) {
foreach ($this->getRequest()->getFiles()->toArray() as $file) {
$fhead = array('Content-Type' => $file['ctype']);
$body .= $this->encodeFormData($boundary, $file['formname'], $file['data'], $file['filename'], $fhead);
}
Expand Down
2 changes: 0 additions & 2 deletions library/Zend/I18n/Translator/Plural/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,6 @@ public function advance($id = null)
*/
protected function getNextToken()
{
$token = array();

while ($this->string[$this->currentPos] === ' ' || $this->string[$this->currentPos] === "\t") {
$this->currentPos++;
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Json/Server/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ protected function _getSmdMethods()
if (null === $this->smdMethods) {
$this->smdMethods = array();
$methods = get_class_methods('Zend\\Json\\Server\\Smd');
foreach ($methods as $key => $method) {
foreach ($methods as $method) {
if (!preg_match('/^(set|get)/', $method)) {
continue;
}
Expand Down
1 change: 0 additions & 1 deletion library/Zend/Json/Server/Smd/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ public function getReturn()
*/
public function toArray()
{
$name = $this->getName();
$envelope = $this->getEnvelope();
$target = $this->getTarget();
$transport = $this->getTransport();
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Mail/Protocol/Imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public function escapeString($string)
public function escapeList($list)
{
$result = array();
foreach ($list as $k => $v) {
foreach ($list as $v) {
if (!is_array($v)) {
// $result[] = $this->escapeString($v);
$result[] = $v;
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/ModuleManager/Listener/ConfigListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function onLoadModulesPost(ModuleEvent $e)

// Merge all of the collected configs
$this->mergedConfig = $this->getOptions()->getExtraConfig() ?: array();
foreach ($this->configs as $key => $config) {
foreach ($this->configs as $config) {
$this->mergedConfig = ArrayUtils::merge($this->mergedConfig, $config);
}

Expand Down
4 changes: 2 additions & 2 deletions library/Zend/Permissions/Acl/Acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ protected function roleDFSVisitAllPrivileges(Role\RoleInterface $role, Resource\
}

$dfs['visited'][$role->getRoleId()] = true;
foreach ($this->getRoleRegistry()->getParents($role) as $roleParentId => $roleParent) {
foreach ($this->getRoleRegistry()->getParents($role) as $roleParent) {
$dfs['stack'][] = $roleParent;
}

Expand Down Expand Up @@ -925,7 +925,7 @@ protected function roleDFSVisitOnePrivilege(Role\RoleInterface $role, Resource\R
}

$dfs['visited'][$role->getRoleId()] = true;
foreach ($this->getRoleRegistry()->getParents($role) as $roleParentId => $roleParent) {
foreach ($this->getRoleRegistry()->getParents($role) as $roleParent) {
$dfs['stack'][] = $roleParent;
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Session/Config/SessionConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function setHashFunction($hashFunction)
{
$hashFunction = (string) $hashFunction;
$validHashFunctions = $this->getHashFunctions();
if (!in_array($hashFunction, $this->getHashFunctions(), true)) {
if (!in_array($hashFunction, $validHashFunctions, true)) {
throw new Exception\InvalidArgumentException('Invalid hash function provided');
}

Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Soap/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public function getSoapVersion()
*/
public function setClassmap(array $classmap)
{
foreach ($classmap as $type => $class) {
foreach ($classmap as $class) {
if (!class_exists($class)) {
throw new Exception\InvalidArgumentException('Invalid class in class map');
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Soap/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public function setClassmap($classmap)
if (!is_array($classmap)) {
throw new Exception\InvalidArgumentException('Classmap must be an array');
}
foreach ($classmap as $type => $class) {
foreach ($classmap as $class) {
if (!class_exists($class)) {
throw new Exception\InvalidArgumentException('Invalid class in class map');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ public function addComplexType($type)
$this->getContext()->addType($type, $soapType);


$defaultProperties = $class->getDefaultProperties();

$defaultProperties = $class->getDefaultProperties();

$complexType = $dom->createElement('xsd:complexType');
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Stdlib/Hydrator/Reflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected static function getReflProperties($input)
$reflClass = new ReflectionClass($input);
$reflProperties = $reflClass->getProperties();

foreach ($reflProperties as $key => $property) {
foreach ($reflProperties as $property) {
$property->setAccessible(true);
self::$reflProperties[$input][$property->getName()] = $property;
}
Expand Down
1 change: 0 additions & 1 deletion library/Zend/XmlRpc/Server/Fault.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public function __construct(\Exception $e)
$this->exception = $e;
$code = 404;
$message = 'Unknown error';
$exceptionClass = get_class($e);

foreach (array_keys(self::$faultExceptionClasses) as $class) {
if ($e instanceof $class) {
Expand Down

0 comments on commit 32da576

Please sign in to comment.