Skip to content
Snippets Groups Projects
Commit b1fa9b6c authored by Thibaut Vallee's avatar Thibaut Vallee
Browse files

Fixe sur les signature de collection

parent 0c996dfa
No related branches found
No related tags found
No related merge requests found
Pipeline #32304 failed
CHANGELOG CHANGELOG
========= =========
7.0.3 (27/08/2024)
------------------
- Fix : signatures des fonctions de UnicaenLdap\Collection
6.0.0 (28/02/2023) 6.0.0 (28/02/2023)
------------------ ------------------
......
...@@ -16,19 +16,19 @@ class Collection implements Iterator, Countable ...@@ -16,19 +16,19 @@ class Collection implements Iterator, Countable
/** /**
* @var AbstractService * @var AbstractService
*/ */
private $service; private AbstractService $service;
/** /**
* Liste des identifiants à parcourir * Liste des identifiants à parcourir
* *
* @var string[] * @var string[]
*/ */
private $data; private array $data;
/** /**
* @var integer * @var integer
*/ */
private $index = 0; private int $index = 0;
/** /**
...@@ -50,7 +50,7 @@ class Collection implements Iterator, Countable ...@@ -50,7 +50,7 @@ class Collection implements Iterator, Countable
* *
* @return int * @return int
*/ */
public function count() public function count(): int
{ {
return count($this->data); return count($this->data);
} }
...@@ -60,8 +60,9 @@ class Collection implements Iterator, Countable ...@@ -60,8 +60,9 @@ class Collection implements Iterator, Countable
* Implements Iterator * Implements Iterator
* *
* @return Entity * @return Entity
* @throws \UnicaenLdap\Exception
*/ */
public function current() public function current(): mixed
{ {
$current = $this->data[$this->index]; $current = $this->data[$this->index];
...@@ -74,7 +75,7 @@ class Collection implements Iterator, Countable ...@@ -74,7 +75,7 @@ class Collection implements Iterator, Countable
* *
* @return int|null * @return int|null
*/ */
public function key() public function key(): mixed
{ {
return $this->index; return $this->index;
} }
...@@ -84,7 +85,7 @@ class Collection implements Iterator, Countable ...@@ -84,7 +85,7 @@ class Collection implements Iterator, Countable
* Implements Iterator * Implements Iterator
* *
*/ */
public function next() public function next(): void
{ {
++$this->index; ++$this->index;
} }
...@@ -93,7 +94,7 @@ class Collection implements Iterator, Countable ...@@ -93,7 +94,7 @@ class Collection implements Iterator, Countable
* Rewind the Iterator to the first result item * Rewind the Iterator to the first result item
* Implements Iterator * Implements Iterator
*/ */
public function rewind() public function rewind(): void
{ {
$this->index = 0; $this->index = 0;
} }
...@@ -105,7 +106,7 @@ class Collection implements Iterator, Countable ...@@ -105,7 +106,7 @@ class Collection implements Iterator, Countable
* *
* @return bool * @return bool
*/ */
public function valid() public function valid(): bool
{ {
return isset($this->data[$this->index]); return isset($this->data[$this->index]);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment