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

Commit

Permalink
Merge branch 'useStatementFixes' of https://github.com/marc-mabe/zf2
Browse files Browse the repository at this point in the history
…into hotfix/import-fixes
  • Loading branch information
weierophinney committed Jun 20, 2012
2 parents 5dbd41c + 200a173 commit 3569d8b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
22 changes: 12 additions & 10 deletions src/Csrf.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

namespace Zend\Validator;

use Zend\Session\Container as SessionContainer;
use Traversable,
Zend\Stdlib\ArrayUtils,
Zend\Session\Container as SessionContainer;

class Csrf extends AbstractValidator
{
Expand Down Expand Up @@ -49,13 +51,13 @@ class Csrf extends AbstractValidator
/**
* Static cache of the session names to generated hashes
*
* @var array
* @var array
*/
protected static $hashCache;

/**
* Name of CSRF element (used to create non-colliding hashes)
*
*
* @var string
*/
protected $name = 'csrf';
Expand All @@ -79,8 +81,8 @@ class Csrf extends AbstractValidator

/**
* Constructor
*
* @param array $options
*
* @param array $options
* @return void
*/
public function __construct($options = array())
Expand Down Expand Up @@ -118,9 +120,9 @@ public function __construct($options = array())

/**
* Does the provided token match the one generated?
*
* @param string $value
* @param mixed $context
*
* @param string $value
* @param mixed $context
* @return bool
*/
public function isValid($value, $context = null)
Expand Down Expand Up @@ -148,7 +150,7 @@ public function setName($name)
$this->name = (string) $name;
return $this;
}

/**
* Get CSRF name
*
Expand Down Expand Up @@ -302,7 +304,7 @@ protected function generateHash()
* Get validation token
*
* Retrieve token from session, if it exists.
*
*
* @return null|string
*/
protected function getValidationToken()
Expand Down
3 changes: 1 addition & 2 deletions src/Iban.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ public function __construct($options = null)
}

if (is_array($options)) {
$options = $options;
if (array_key_exists('locale', $options)) {
$options = $options['locale'];
unset($options['locale']);
Expand All @@ -135,7 +134,7 @@ public function __construct($options = null)
if ($options !== null) {
$this->setLocale($options);
}

parent::__construct($options);
}

Expand Down

0 comments on commit 3569d8b

Please sign in to comment.