Skip to content
Snippets Groups Projects
Commit d90b86ec authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Corrections de signatures de méthodes incompatibles avec la classe mère ou...

Corrections de signatures de méthodes incompatibles avec la classe mère ou interface implémentée, dont certaines déclenchaient un E_WARNING en PHP 7.2
parent 456b94d9
No related branches found
No related tags found
No related merge requests found
Pipeline #3861 passed
...@@ -231,10 +231,7 @@ class Cas extends AbstractAdapter implements EventManagerAwareInterface, Service ...@@ -231,10 +231,7 @@ class Cas extends AbstractAdapter implements EventManagerAwareInterface, Service
} }
/** /**
* Inject an EventManager instance * {@inheritdoc}
*
* @param EventManagerInterface $eventManager
* @return self
*/ */
public function setEventManager(EventManagerInterface $eventManager) public function setEventManager(EventManagerInterface $eventManager)
{ {
......
...@@ -293,10 +293,7 @@ class Ldap extends AbstractAdapter implements ServiceLocatorAwareInterface, Even ...@@ -293,10 +293,7 @@ class Ldap extends AbstractAdapter implements ServiceLocatorAwareInterface, Even
} }
/** /**
* Inject an EventManager instance * {@inheritdoc}
*
* @param EventManagerInterface $eventManager
* @return Ldap
*/ */
public function setEventManager(EventManagerInterface $eventManager) public function setEventManager(EventManagerInterface $eventManager)
{ {
......
...@@ -139,10 +139,7 @@ class Chain implements StorageInterface, EventManagerAwareInterface ...@@ -139,10 +139,7 @@ class Chain implements StorageInterface, EventManagerAwareInterface
} }
/** /**
* Inject an EventManager instance * {@inheritdoc}
*
* @param EventManagerInterface $eventManager
* @return self
*/ */
public function setEventManager(EventManagerInterface $eventManager) public function setEventManager(EventManagerInterface $eventManager)
{ {
......
...@@ -189,11 +189,7 @@ abstract class AbstractRole implements RoleInterface ...@@ -189,11 +189,7 @@ abstract class AbstractRole implements RoleInterface
} }
/** /**
* Add a user to the role. * {@inheritdoc}
*
* @param UserInterface $user
*
* @return void
*/ */
public function addUser(UserInterface $user) public function addUser(UserInterface $user)
{ {
......
...@@ -93,12 +93,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface ...@@ -93,12 +93,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Set id. * Set id.
* *
* @param int $id * @param int $id
* * @return self
* @return void
*/ */
public function setId($id) public function setId($id)
{ {
$this->id = (int) $id; $this->id = (int) $id;
return $this;
} }
/** /**
...@@ -115,12 +116,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface ...@@ -115,12 +116,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Set username. * Set username.
* *
* @param string $username * @param string $username
* * @return self
* @return void
*/ */
public function setUsername($username) public function setUsername($username)
{ {
$this->username = $username; $this->username = $username;
return $this;
} }
/** /**
...@@ -137,12 +139,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface ...@@ -137,12 +139,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Set email. * Set email.
* *
* @param string $email * @param string $email
* * @return self
* @return void
*/ */
public function setEmail($email) public function setEmail($email)
{ {
$this->email = $email; $this->email = $email;
return $this;
} }
/** /**
...@@ -159,12 +162,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface ...@@ -159,12 +162,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Set displayName. * Set displayName.
* *
* @param string $displayName * @param string $displayName
* * @return self
* @return void
*/ */
public function setDisplayName($displayName) public function setDisplayName($displayName)
{ {
$this->displayName = $displayName; $this->displayName = $displayName;
return $this;
} }
/** /**
...@@ -181,12 +185,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface ...@@ -181,12 +185,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Set password. * Set password.
* *
* @param string $password * @param string $password
* * @return self
* @return void
*/ */
public function setPassword($password) public function setPassword($password)
{ {
$this->password = $password; $this->password = $password;
return $this;
} }
/** /**
...@@ -203,12 +208,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface ...@@ -203,12 +208,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Set state. * Set state.
* *
* @param int $state * @param int $state
* * @return self
* @return void
*/ */
public function setState($state) public function setState($state)
{ {
$this->state = $state; $this->state = $state;
return $this;
} }
/** /**
...@@ -221,10 +227,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface ...@@ -221,10 +227,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
/** /**
* @param string $passwordResetToken * @param string $passwordResetToken
* @return self
*/ */
public function setPasswordResetToken($passwordResetToken = null) public function setPasswordResetToken($passwordResetToken = null)
{ {
$this->passwordResetToken = $passwordResetToken; $this->passwordResetToken = $passwordResetToken;
return $this;
} }
/** /**
...@@ -241,12 +250,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface ...@@ -241,12 +250,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Add a role to the user. * Add a role to the user.
* *
* @param RoleInterface $role * @param RoleInterface $role
* * @return self
* @return void
*/ */
public function addRole(RoleInterface $role) public function addRole(RoleInterface $role)
{ {
$this->roles->add($role); $this->roles->add($role);
return $this;
} }
/** /**
......
...@@ -67,9 +67,7 @@ class ShibUser implements UserInterface ...@@ -67,9 +67,7 @@ class ShibUser implements UserInterface
} }
/** /**
* Get id. * {@inheritdoc}
*
* @return string
*/ */
public function getId() public function getId()
{ {
......
...@@ -183,10 +183,7 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface ...@@ -183,10 +183,7 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface
} }
/** /**
* Inject an EventManager instance * {@inheritdoc}
*
* @param EventManagerInterface $eventManager
* @return self
*/ */
public function setEventManager(EventManagerInterface $eventManager) public function setEventManager(EventManagerInterface $eventManager)
{ {
......
...@@ -5,8 +5,7 @@ namespace UnicaenAuth\Service; ...@@ -5,8 +5,7 @@ namespace UnicaenAuth\Service;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use UnicaenAuth\Entity\Db\AbstractUser; use UnicaenAuth\Entity\Db\AbstractUser;
use UnicaenAuth\Options\ModuleOptions; use UnicaenAuth\Options\ModuleOptions;
use Zend\Hydrator\HydratorInterface; use Zend\Stdlib\Hydrator\HydratorInterface;
use ZfcUser\Entity\UserInterface;
class UserMapper extends \ZfcUser\Mapper\User class UserMapper extends \ZfcUser\Mapper\User
{ {
...@@ -48,12 +47,18 @@ class UserMapper extends \ZfcUser\Mapper\User ...@@ -48,12 +47,18 @@ class UserMapper extends \ZfcUser\Mapper\User
return $er->find($id); return $er->find($id);
} }
public function insert(UserInterface $entity, $tableName = null, HydratorInterface $hydrator = null) /**
* {@inheritdoc}
*/
public function insert($entity, $tableName = null, HydratorInterface $hydrator = null)
{ {
return $this->persist($entity); return $this->persist($entity);
} }
public function update(UserInterface $entity, $where = null, $tableName = null, HydratorInterface $hydrator = null) /**
* {@inheritdoc}
*/
public function update($entity, $where = null, $tableName = null, HydratorInterface $hydrator = null)
{ {
return $this->persist($entity); return $this->persist($entity);
} }
......
...@@ -2,24 +2,27 @@ ...@@ -2,24 +2,27 @@
namespace UnicaenAuth\View\Helper; namespace UnicaenAuth\View\Helper;
use Zend\ServiceManager\ServiceLocatorInterface; use UnicaenAuth\Service\UserContext;
use Zend\View\HelperPluginManager;
/** /**
* Description of UserProfileFactory * Description of UserProfileFactory
* *
* @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr> * @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>
*/ */
class UserProfileSelectFactory extends \UnicaenApp\View\Helper\UserProfileSelectFactory class UserProfileSelectFactory
{ {
/** /**
* Create service * Create service
* *
* @param ServiceLocatorInterface $helperPluginManager * @param HelperPluginManager $helperPluginManager
* @return UserProfile * @return UserProfileSelect
*/ */
public function createService(ServiceLocatorInterface $helperPluginManager) public function createService(HelperPluginManager $helperPluginManager)
{ {
$serviceLocator = $helperPluginManager->getServiceLocator(); $serviceLocator = $helperPluginManager->getServiceLocator();
/** @var UserContext $userContextService */
$userContextService = $serviceLocator->get('AuthUserContext'); $userContextService = $serviceLocator->get('AuthUserContext');
return new UserProfileSelect($userContextService); return new UserProfileSelect($userContextService);
......
...@@ -2,24 +2,27 @@ ...@@ -2,24 +2,27 @@
namespace UnicaenAuth\View\Helper; namespace UnicaenAuth\View\Helper;
use Zend\ServiceManager\ServiceLocatorInterface; use UnicaenAuth\Service\UserContext;
use Zend\View\HelperPluginManager;
/** /**
* *
* *
* @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr> * @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>
*/ */
class UserProfileSelectRadioItemFactory extends \UnicaenApp\View\Helper\UserProfileSelectFactory class UserProfileSelectRadioItemFactory
{ {
/** /**
* Create service * Create service
* *
* @param ServiceLocatorInterface $helperPluginManager * @param HelperPluginManager $helperPluginManager
* @return UserProfile * @return UserProfileSelectRadioItem
*/ */
public function createService(ServiceLocatorInterface $helperPluginManager) public function createService(HelperPluginManager $helperPluginManager)
{ {
$serviceLocator = $helperPluginManager->getServiceLocator(); $serviceLocator = $helperPluginManager->getServiceLocator();
/** @var UserContext $userContextService */
$userContextService = $serviceLocator->get('AuthUserContext'); $userContextService = $serviceLocator->get('AuthUserContext');
return new UserProfileSelectRadioItem($userContextService); return new UserProfileSelectRadioItem($userContextService);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment