Refactor
This commit is contained in:
parent
6fe88456ca
commit
aa08f702b2
4 changed files with 4 additions and 4 deletions
|
@ -33,7 +33,7 @@ readonly final class Events implements \IteratorAggregate {
|
|||
/**
|
||||
* @param Event[] $events
|
||||
*/
|
||||
public static function new(array $events): self {
|
||||
public static function fromEvents(array $events): self {
|
||||
return new self($events);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ final class Presentation extends Node implements NodeInterface {
|
|||
public const NODE_TYPE = 'presentation';
|
||||
|
||||
public function getPastEvents(): Events {
|
||||
$events = Events::new($this->get('field_events')->referencedEntities());
|
||||
$events = Events::fromEvents($this->get('field_events')->referencedEntities());
|
||||
|
||||
$today = strtotime('today');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue