Skip to content

Commit

Permalink
Fix php8 deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
parijke committed Apr 3, 2024
1 parent 5f0da30 commit c19a3d7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/OpenConext/Profile/Value/ConsentList.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use ArrayIterator;
use Countable;
use IteratorAggregate;
use Traversable;

final class ConsentList implements IteratorAggregate, Countable
{
Expand Down Expand Up @@ -56,12 +57,12 @@ public function map(callable $predicate)
return array_map($predicate, $this->consents);
}

public function getIterator()
public function getIterator(): Traversable
{
return new ArrayIterator($this->consents);
}

public function count()
public function count(): int
{
return count($this->consents);
}
Expand Down
4 changes: 2 additions & 2 deletions src/OpenConext/Profile/Value/LocaleSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ public function contains(Locale $otherLocale)
return false;
}

public function getIterator()
public function getIterator(): ArrayIterator
{
return new ArrayIterator($this->locales);
}

public function count()
public function count(): int
{
return count($this->locales);
}
Expand Down
5 changes: 3 additions & 2 deletions src/OpenConext/Profile/Value/SpecifiedConsentList.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Countable;
use IteratorAggregate;
use OpenConext\Profile\Exception\LogicException;
use Traversable;
use function ksort;
use const SORT_STRING;

Expand Down Expand Up @@ -76,12 +77,12 @@ private function initializeWith(SpecifiedConsent $specifiedConsent)
$this->specifiedConsents[] = $specifiedConsent;
}

public function getIterator()
public function getIterator(): Traversable
{
return new ArrayIterator($this->specifiedConsents);
}

public function count()
public function count(): int
{
return count($this->specifiedConsents);
}
Expand Down

0 comments on commit c19a3d7

Please sign in to comment.