Commit 0f113d26 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Adapter Db: suppression catch exception inexistante ; correction doc ; ajout...

Adapter Db: suppression catch exception inexistante ; correction doc ; ajout initialisation de variable manquante.
parent c7e0f5e5
Pipeline #3446 failed with stages
in 2 minutes and 1 second
......@@ -2,15 +2,13 @@
namespace UnicaenAuth\Authentication\Storage;
use PDOException;
use Zend\ServiceManager\ServiceManager;
use Zend\ServiceManager\ServiceManagerAwareInterface;
use Zend\ServiceManager\Exception\ServiceNotFoundException;
use Zend\Authentication\Exception\InvalidArgumentException;
use Doctrine\DBAL\DBALException;
use Zend\Authentication\Storage\Session;
use Zend\Authentication\Storage\StorageInterface;
use Zend\ServiceManager\Exception\ServiceNotFoundException;
use Zend\ServiceManager\ServiceManager;
use Zend\ServiceManager\ServiceManagerAwareInterface;
use ZfcUser\Mapper\UserInterface as UserMapper;
use Doctrine\DBAL\DBALException;
/**
* Db authentication storage.
......@@ -38,15 +36,13 @@ class Db implements ChainableStorage, ServiceManagerAwareInterface
* @var ServiceManager
*/
protected $serviceManager;
/**
* Returns the contents of storage
*
* Behavior is undefined when storage is empty.
*
* @params ChainEvent $e
* @throws InvalidArgumentException If reading contents from storage is impossible
* @return void
* @param ChainEvent $e
*/
public function read(ChainEvent $e)
{
......@@ -66,9 +62,7 @@ class Db implements ChainableStorage, ServiceManagerAwareInterface
/**
* Writes $contents to storage
*
* @params ChainEvent $e
* @throws \Zend\Authentication\Exception\InvalidArgumentException If writing $contents to storage is impossible
* @return void
* @param ChainEvent $e
*/
public function write(ChainEvent $e)
{
......@@ -81,9 +75,7 @@ class Db implements ChainableStorage, ServiceManagerAwareInterface
/**
* Clears contents from storage
*
* @params ChainEvent $e
* @throws \Zend\Authentication\Exception\InvalidArgumentException If clearing contents from storage is impossible
* @return void
* @param ChainEvent $e
*/
public function clear(ChainEvent $e)
{
......@@ -92,7 +84,6 @@ class Db implements ChainableStorage, ServiceManagerAwareInterface
}
/**
*
* @return null
*/
protected function findIdentity()
......@@ -104,7 +95,9 @@ class Db implements ChainableStorage, ServiceManagerAwareInterface
if ($id && !is_scalar($id)) {
return $id;
}
$identity = null;
/**
* 1ere tentative :
*
......@@ -121,9 +114,6 @@ class Db implements ChainableStorage, ServiceManagerAwareInterface
catch (DBALException $dbale) {
$identity = null;
}
catch (PDOException $pdoe) {
$identity = null;
}
catch (ServiceNotFoundException $e) {
$identity = null;
}
......@@ -145,9 +135,6 @@ class Db implements ChainableStorage, ServiceManagerAwareInterface
catch (DBALException $dbale) {
$identity = null;
}
catch (PDOException $pdoe) {
$identity = null;
}
catch (ServiceNotFoundException $e) {
$identity = null;
}
......@@ -220,7 +207,7 @@ class Db implements ChainableStorage, ServiceManagerAwareInterface
/**
* Set service manager instance
*
* @param ServiceManager $locator
* @param ServiceManager $serviceManager
* @return self
*/
public function setServiceManager(ServiceManager $serviceManager)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment