Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
markuspoerschke committed Dec 18, 2023
1 parent 092aabc commit 76d2a8d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ jobs:
if: ${{ matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1' }}
run: "composer up --prefer-lowest"

- name: "Run tests (old PHP versions)"
if: ${{ matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1' }}
run: "make test-phpunit test-psalm php-examples"

- name: "Run tests"
if: ${{ matrix.php-version == '8.2' }}
run: "make -j -O test"

- name: "Send code coverage"
Expand Down
4 changes: 1 addition & 3 deletions src/Domain/Collection/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Eluceo\iCal\Domain\Entity\Event;
use Iterator;
use IteratorAggregate;
use ReturnTypeWillChange;

/**
* @implements IteratorAggregate<Event>
Expand All @@ -24,8 +23,7 @@ abstract class Events implements IteratorAggregate
/**
* @return Iterator<Event>
*/
#[ReturnTypeWillChange]
abstract public function getIterator();
abstract public function getIterator(): Iterator;

abstract public function addEvent(Event $event): void;
}
5 changes: 2 additions & 3 deletions src/Domain/Collection/EventsArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use ArrayIterator;
use Eluceo\iCal\Domain\Entity\Event;
use ReturnTypeWillChange;
use Iterator;

final class EventsArray extends Events
{
Expand All @@ -30,8 +30,7 @@ public function __construct(array $events)
array_walk($events, [$this, 'addEvent']);
}

#[ReturnTypeWillChange]
public function getIterator()
public function getIterator(): Iterator
{
return new ArrayIterator($this->events);
}
Expand Down
4 changes: 1 addition & 3 deletions src/Domain/Collection/EventsGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use BadMethodCallException;
use Eluceo\iCal\Domain\Entity\Event;
use Iterator;
use ReturnTypeWillChange;

final class EventsGenerator extends Events
{
Expand All @@ -31,8 +30,7 @@ public function __construct(Iterator $generator)
$this->generator = $generator;
}

#[ReturnTypeWillChange]
public function getIterator()
public function getIterator(): Iterator
{
return $this->generator;
}
Expand Down
2 changes: 0 additions & 2 deletions src/Presentation/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Eluceo\iCal\Presentation\Component\Property;
use Generator;
use IteratorAggregate;
use ReturnTypeWillChange;
use Traversable;

/**
Expand Down Expand Up @@ -64,7 +63,6 @@ public function __toString(): string
/**
* @return Traversable<ContentLine>
*/
#[ReturnTypeWillChange]
public function getIterator(): Traversable
{
return $this->getContentLines();
Expand Down

0 comments on commit 76d2a8d

Please sign in to comment.