Fix phpstan errors
This commit is contained in:
parent
af83b3c431
commit
229cc62b03
8 changed files with 16 additions and 17 deletions
|
@ -35,9 +35,6 @@ readonly final class Events implements \Countable, \IteratorAggregate {
|
|||
->filter(fn (Event $event): bool => $event->isPast());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param non-empty-string[] $dates
|
||||
*/
|
||||
public static function fromDateStrings(string ...$dates): self {
|
||||
$events = array_map(
|
||||
array: $dates,
|
||||
|
|
|
@ -9,8 +9,6 @@ use Drupal\node\NodeInterface;
|
|||
|
||||
final class PresentationCounter {
|
||||
|
||||
private array $presentations;
|
||||
|
||||
public function __construct(private EntityTypeManagerInterface $entityTypeManager) {
|
||||
}
|
||||
|
||||
|
@ -24,6 +22,7 @@ final class PresentationCounter {
|
|||
|
||||
$nodeIds = $query->execute();
|
||||
|
||||
/** @var Presentation[] */
|
||||
$presentations = $nodeStorage->loadMultiple($nodeIds);
|
||||
|
||||
return array_reduce(
|
||||
|
|
|
@ -16,10 +16,6 @@ trait PresentationCreationTrait {
|
|||
use EntityCreationTrait;
|
||||
use NodeCreationTrait;
|
||||
|
||||
/**
|
||||
* @param Event[] $events
|
||||
* @param bool $isPublished
|
||||
*/
|
||||
private function createPresentation(Events $events, bool $isPublished = TRUE): Presentation {
|
||||
$presentation = $this->createNode([
|
||||
'field_events' => $events->toEvents(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue