Skip to content
Snippets Groups Projects
Commit f9af6a82 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 34199b7d
Branches
Tags
No related merge requests found
Pipeline #3935 passed
Showing
with 21 additions and 61 deletions
......@@ -73,7 +73,7 @@ class Module implements
*
* @param EventInterface $e
* @see BootstrapListenerInterface
* @return void
* @return array
*/
public function onBootstrap(EventInterface $e) /* @var $e \Zend\Mvc\MvcEvent */
{
......@@ -133,6 +133,8 @@ class Module implements
$maintenanceListener->attach($eventManager);
$this->appendSessionRefreshJs($e);
return [];
}
/**
......
......@@ -8,6 +8,7 @@ use Zend\Http\Header\Expires;
use Zend\Http\Header\Pragma;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\ServiceManager\ServiceLocatorAwareTrait;
use Zend\Stdlib\ResponseInterface as Response;
/**
......
......@@ -124,12 +124,12 @@ class DateInfSupInputFilter extends InputFilter
/**
* Ajoute les validateurs nécessaires.
*
* @return self
* @return void
*/
public function init()
{
if ($this->initialized) {
return $this;
return;
}
$dateInfValidatorChain = new ValidatorChain();
......@@ -234,8 +234,6 @@ class DateInfSupInputFilter extends InputFilter
$this->inputSup->setValidatorChain($dateSupValidatorChain);
$this->initialized = true;
return $this;
}
/**
......
......@@ -73,17 +73,7 @@ abstract class MultipageForm extends \Zend\Form\Form
protected $cancelAction;
/**
* Add an element or fieldset
*
* If $elementOrFieldset is an array or Traversable, passes the argument on
* to the composed factory to create the object before attaching it.
*
* $flags could contain metadata such as the alias under which to register
* the element or fieldset, order in which to prioritize it, etc.
*
* @param array|Traversable|ElementInterface $elementOrFieldset
* @param array $flags
* @return \Zend\Form\Fieldset|\Zend\Form\FieldsetInterface|\Zend\Form\FormInterface
* {@inheritdoc}
*/
public function add($elementOrFieldset, array $flags = array())
{
......
......@@ -88,9 +88,7 @@ class FormRowDateInfSup extends FormRow
}
/**
* Retrieve the FormDateInfSup helper
*
* @return FormDateInfSup
* {@inheritdoc}
*/
protected function getElementHelper()
{
......
......@@ -37,10 +37,7 @@ class FormSearchAndSelect extends FormText
protected $spinnerSource = "//gest.unicaen.fr/images/ajax-loader-r.gif";
/**
* Invoke helper as functor
*
* @param SearchAndSelect|null $element
* @return string|FormSearchAndSelect
* {@inheritdoc}
*/
public function __invoke(ElementInterface $element = null)
{
......@@ -53,11 +50,7 @@ class FormSearchAndSelect extends FormText
}
/**
* Render a form <input> element from the provided $element
*
* @param Text $element
* @throws Exception\DomainException
* @return string
* {@inheritdoc}
*/
public function render(ElementInterface $element)
{
......
......@@ -31,7 +31,7 @@ trait MouchardAwareTrait
/**
* @param Mouchard $mouchard
*
* @return MouchardAwareTrait
* @return self
*/
public function setMouchard(Mouchard $mouchard)
{
......
......@@ -76,7 +76,7 @@ class MouchardServiceFactory implements FactoryInterface
public function createMouchard($alias, array $mouconf)
{
$serviceMouchard = new Mouchard();
$serviceMouchard = new Mouchard('');
if (isset($mouconf['listeners'])) {
......
......@@ -28,7 +28,7 @@ class ExceptionStrategy extends \Zend\Mvc\View\Http\ExceptionStrategy
/**
* {@inheritDoc}
*/
public function attach(EventManagerInterface $events)
public function attach(EventManagerInterface $events, $priority = 1)
{
$this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($this, 'prepareExceptionViewModel'), 1000);
// $this->listeners[] = $events->attach(MvcEvent::EVENT_RENDER_ERROR, array($this, 'prepareExceptionViewModel'), 5000);
......
......@@ -65,10 +65,7 @@ class EarlierThan extends LessThan
}
/**
* Sets the value to be validated and clears the messages and errors arrays
*
* @param DateTime|string $value
* @return self
* {@inheritdoc}
*/
protected function setValue($value)
{
......
......@@ -65,10 +65,7 @@ class LaterThan extends GreaterThan
}
/**
* Sets the value to be validated and clears the messages and errors arrays
*
* @param DateTime|string $value
* @return self
* {@inheritdoc}
*/
protected function setValue($value)
{
......
......@@ -12,14 +12,7 @@ class HeadLink extends \Zend\View\Helper\HeadLink implements ServiceLocatorAware
/**
* Return headStyle object
*
* Returns headStyle helper object; optionally, allows specifying
*
* @param string $content Stylesheet contents
* @param string $placement Append, prepend, or set
* @param string|array $attributes Optional attributes to utilize
* @return HeadStyle
* {@inheritdoc}
*/
public function __invoke(array $attributes = null, $placement = AbstractContainer::APPEND)
{
......
......@@ -117,11 +117,7 @@ class AbstractMenu extends Menu
private $acceptCache = [];
/**
* View helper entry point:
* Retrieves helper and optionally sets container to operate on
*
* @param AbstractContainer $container [optional] container to operate on
* @return self
* {@inheritdoc}
*/
public function __invoke($container = null)
{
......
......@@ -27,11 +27,7 @@ class MenuContextuel extends AbstractMenu
protected $eventName;
/**
* View helper entry point:
* Retrieves helper and optionally sets container to operate on
*
* @param AbstractContainer $container [optional] container to operate on
* @return self
* {@inheritdoc}
*/
public function __invoke($container = null)
{
......
......@@ -4,6 +4,7 @@ namespace UnicaenAppTest\Controller\Plugin\TestAsset;
use UnicaenAppTest\Form\TestAsset\ContactMultipageForm;
use Zend\Http\PhpEnvironment\Response;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
/**
* Contrôleur pour tests du plugin de contrôleur MultipageForm.
......@@ -19,17 +20,15 @@ class ContactController extends AbstractActionController
/**
* Home action.
*
* @return array
* @return ViewModel
*/
public function indexAction()
{
return array();
return new ViewModel();
}
/**
* Entry point, i.e. step 0.
*
* @return Response
*/
public function ajouterAction()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment