Commit 132be1e4 authored by Urvashi Vora's avatar Urvashi Vora Committed by Marcin Grabias
Browse files

Issue #3282952 by urvashi_vora: Bug Drupal Coding Standard

parent 7870f271
Loading
Loading
Loading
Loading
+10 −2
Changes for src/Annotation/GroupContentCloner.php: 10 added lines, 2 removed lines.
Original line number Diff line number Diff line
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace Drupal\group_clone\Annotation;

@@ -8,7 +10,7 @@ use Drupal\Core\Annotation\Translation;
/**
 * Defines a Group content cloner annotation object.
 *
 * Plugin Namespace: Plugin\GroupContentCloner
 * Plugin Namespace: Plugin\GroupContentCloner.
 *
 * @Annotation
 */
@@ -16,18 +18,24 @@ final class GroupContentCloner extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public string $id;

  /**
   * The human-readable name of the action plugin.
   *
   * @var label
   *
   * @ingroup plugin_translatable
   */
  public Translation $label;

  /**
   * The group content provider base plugin ID this cloner applies to.
   *
   * @var string
   */
  public string $content_plugin_id = '';

+5 −1
Changes for src/Entity/GroupCloneSettings.php: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace Drupal\group_clone\Entity;

@@ -27,6 +29,8 @@ final class GroupCloneSettings extends ConfigEntityBase {

  /**
   * The group type ID.
   *
   * @var string
   */
  protected ?string $id;

+3 −0
Changes for src/EntityCloneTrait.php: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -11,6 +11,9 @@ use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\Field\FieldConfigInterface;
use Drupal\Core\Field\FieldDefinitionInterface;

/**
 * {@inheritdoc}
 */
trait EntityCloneTrait {

  /**
+17 −2
Changes for src/Form/GroupCloneForm.php: 17 added lines, 2 removed lines.
Original line number Diff line number Diff line
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

namespace Drupal\group_clone\Form;

@@ -7,16 +9,29 @@ use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\State\StateInterface;
use Drupal\group\Entity\GroupInterface;
use Drupal\group\Entity\Storage\GroupStorage;
use Drupal\group_clone\GroupCloner;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * {@inheritdoc}
 */
final class GroupCloneForm extends FormBase {

  use GroupCloneFormTrait;

  /**
   * {@inheritdoc}
   */
  private GroupCloner $cloner;

  /**
   * {@inheritdoc}
   */
  private EntityTypeManagerInterface $entityTypeManager;

  /**
   * {@inheritdoc}
   */
  private StateInterface $state;

  /**
+6 −0
Changes for src/Form/GroupCloneFormTrait.php: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -8,8 +8,14 @@ use Drupal\group\Entity\GroupTypeInterface;
use Drupal\group\Entity\Storage\GroupContentTypeStorageInterface;
use Drupal\group_clone\Entity\GroupCloneSettings;

/**
 * {@inheritdoc}
 */
trait GroupCloneFormTrait {

  /**
   * {@inheritdoc}
   */
  private array $settings = [];

  /**
Loading