reviewer-1.2.x-dev/src/Reviewer/Review/ReviewFactory.php

src/Reviewer/Review/ReviewFactory.php
<?php

declare(strict_types=1);

namespace Drupal\reviewer\Reviewer\Review;

use Drupal\Core\Config\Entity\ConfigEntityInterface;
use Drupal\reviewer\Reviewer\Result\ResultFactoryInterface;

/**
 * Creates reviews.
 */
final readonly class ReviewFactory implements ReviewFactoryInterface {

  // phpcs:ignore Drupal.Commenting.FunctionComment.Missing
  public function __construct(
    private ResultFactoryInterface $resultFactory,
  ) {}

  /**
   * {@inheritdoc}
   */
  public function create(
    string $id,
    string $label,
    array $checklists,
    array $ignored,
    ConfigEntityInterface|null $configEntity = NULL,
  ): Review {
    return new Review(
      $id,
      $label,
      $checklists,
      $ignored,
      $this->resultFactory,
      $configEntity,
    );
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc