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
Branches
Tags
No related merge requests found
Pipeline #3861 passed
......@@ -231,10 +231,7 @@ class Cas extends AbstractAdapter implements EventManagerAwareInterface, Service
}
/**
* Inject an EventManager instance
*
* @param EventManagerInterface $eventManager
* @return self
* {@inheritdoc}
*/
public function setEventManager(EventManagerInterface $eventManager)
{
......
......@@ -293,10 +293,7 @@ class Ldap extends AbstractAdapter implements ServiceLocatorAwareInterface, Even
}
/**
* Inject an EventManager instance
*
* @param EventManagerInterface $eventManager
* @return Ldap
* {@inheritdoc}
*/
public function setEventManager(EventManagerInterface $eventManager)
{
......
......@@ -139,10 +139,7 @@ class Chain implements StorageInterface, EventManagerAwareInterface
}
/**
* Inject an EventManager instance
*
* @param EventManagerInterface $eventManager
* @return self
* {@inheritdoc}
*/
public function setEventManager(EventManagerInterface $eventManager)
{
......
......@@ -189,11 +189,7 @@ abstract class AbstractRole implements RoleInterface
}
/**
* Add a user to the role.
*
* @param UserInterface $user
*
* @return void
* {@inheritdoc}
*/
public function addUser(UserInterface $user)
{
......
......@@ -93,12 +93,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Set id.
*
* @param int $id
*
* @return void
* @return self
*/
public function setId($id)
{
$this->id = (int) $id;
return $this;
}
/**
......@@ -115,12 +116,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Set username.
*
* @param string $username
*
* @return void
* @return self
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
......@@ -137,12 +139,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Set email.
*
* @param string $email
*
* @return void
* @return self
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
......@@ -159,12 +162,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Set displayName.
*
* @param string $displayName
*
* @return void
* @return self
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
return $this;
}
/**
......@@ -181,12 +185,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Set password.
*
* @param string $password
*
* @return void
* @return self
*/
public function setPassword($password)
{
$this->password = $password;
return $this;
}
/**
......@@ -203,12 +208,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Set state.
*
* @param int $state
*
* @return void
* @return self
*/
public function setState($state)
{
$this->state = $state;
return $this;
}
/**
......@@ -221,10 +227,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
/**
* @param string $passwordResetToken
* @return self
*/
public function setPasswordResetToken($passwordResetToken = null)
{
$this->passwordResetToken = $passwordResetToken;
return $this;
}
/**
......@@ -241,12 +250,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface
* Add a role to the user.
*
* @param RoleInterface $role
*
* @return void
* @return self
*/
public function addRole(RoleInterface $role)
{
$this->roles->add($role);
return $this;
}
/**
......
......@@ -67,9 +67,7 @@ class ShibUser implements UserInterface
}
/**
* Get id.
*
* @return string
* {@inheritdoc}
*/
public function getId()
{
......
......@@ -183,10 +183,7 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface
}
/**
* Inject an EventManager instance
*
* @param EventManagerInterface $eventManager
* @return self
* {@inheritdoc}
*/
public function setEventManager(EventManagerInterface $eventManager)
{
......
......@@ -5,8 +5,7 @@ namespace UnicaenAuth\Service;
use Doctrine\ORM\EntityManagerInterface;
use UnicaenAuth\Entity\Db\AbstractUser;
use UnicaenAuth\Options\ModuleOptions;
use Zend\Hydrator\HydratorInterface;
use ZfcUser\Entity\UserInterface;
use Zend\Stdlib\Hydrator\HydratorInterface;
class UserMapper extends \ZfcUser\Mapper\User
{
......@@ -48,12 +47,18 @@ class UserMapper extends \ZfcUser\Mapper\User
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);
}
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);
}
......
......@@ -2,24 +2,27 @@
namespace UnicaenAuth\View\Helper;
use Zend\ServiceManager\ServiceLocatorInterface;
use UnicaenAuth\Service\UserContext;
use Zend\View\HelperPluginManager;
/**
* Description of UserProfileFactory
*
* @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>
*/
class UserProfileSelectFactory extends \UnicaenApp\View\Helper\UserProfileSelectFactory
class UserProfileSelectFactory
{
/**
* Create service
*
* @param ServiceLocatorInterface $helperPluginManager
* @return UserProfile
* @param HelperPluginManager $helperPluginManager
* @return UserProfileSelect
*/
public function createService(ServiceLocatorInterface $helperPluginManager)
public function createService(HelperPluginManager $helperPluginManager)
{
$serviceLocator = $helperPluginManager->getServiceLocator();
/** @var UserContext $userContextService */
$userContextService = $serviceLocator->get('AuthUserContext');
return new UserProfileSelect($userContextService);
......
......@@ -2,24 +2,27 @@
namespace UnicaenAuth\View\Helper;
use Zend\ServiceManager\ServiceLocatorInterface;
use UnicaenAuth\Service\UserContext;
use Zend\View\HelperPluginManager;
/**
*
*
* @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>
*/
class UserProfileSelectRadioItemFactory extends \UnicaenApp\View\Helper\UserProfileSelectFactory
class UserProfileSelectRadioItemFactory
{
/**
* Create service
*
* @param ServiceLocatorInterface $helperPluginManager
* @return UserProfile
* @param HelperPluginManager $helperPluginManager
* @return UserProfileSelectRadioItem
*/
public function createService(ServiceLocatorInterface $helperPluginManager)
public function createService(HelperPluginManager $helperPluginManager)
{
$serviceLocator = $helperPluginManager->getServiceLocator();
/** @var UserContext $userContextService */
$userContextService = $serviceLocator->get('AuthUserContext');
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