Skip to content

Commit

Permalink
chore(ldap): fix deprecation warnings about return types
Browse files Browse the repository at this point in the history
When using Ldap authentication, these deprecation warnings were being
sent as part of the API response. This corrupted the expected JSON
response.
  • Loading branch information
jvillal-amp authored and JohnVillalovos committed Jul 2, 2024
1 parent 3005fe2 commit d7ddf5c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/Authentication/Ldap/LDAP2/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ public function sizeLimitExceeded()
*
* @return Net_LDAP2_Entry|false
*/
public function current()
public function current(): mixed
{
if (count($this->_iteratorCache) == 0) {
$this->next();
Expand All @@ -576,7 +576,7 @@ public function current()
* @see current()
* @return string|false DN of the current entry; false in case no entry is returned by current()
*/
public function key()
public function key(): mixed
{
$entry = $this->current();
return ($entry instanceof Net_LDAP2_Entry) ? $entry->dn() : false;
Expand All @@ -591,7 +591,7 @@ public function key()
* @see current()
* @return void
*/
public function next()
public function next(): void
{
// fetch next entry.
// if we have no entrys anymore, we add false (which is
Expand All @@ -614,7 +614,7 @@ public function next()
* @see current()
* @return boolean FALSE if there's nothing more to iterate over
*/
public function valid()
public function valid(): bool
{
return ($this->current() instanceof Net_LDAP2_Entry);
}
Expand All @@ -627,7 +627,7 @@ public function valid()
* @see current()
* @return void
*/
public function rewind()
public function rewind(): void
{
reset($this->_iteratorCache);
}
Expand Down

0 comments on commit d7ddf5c

Please sign in to comment.