Commit bcfe0342 authored by Cindy Arbelaez's avatar Cindy Arbelaez Committed by David Galeano
Browse files

Issue #3314221: Code standard issues

parent 14d0d833
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@

namespace Drupal\tagify\Element;

use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element\Textfield;
use Drupal\Core\Url;
+10 −11
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\KeyValueStore\KeyValueFactoryInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Site\Settings;
use Drupal\Core\Url;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
@@ -181,9 +180,9 @@ class TagifyEntityReferenceAutocompleteWidget extends WidgetBase {
    }

    // User field definition doesn't have fieldStorage defined.
    $cardinality = $target_type != 'user' ? $items->getFieldDefinition()->get('fieldStorage')->get('cardinality') : '';
    $limited = $cardinality === 1 ? 'limited' : '';

    // $cardinality = $target_type != 'user'
    // ?$items->getFieldDefinition()->get('fieldStorage')->get('cardinality'):'';
    // $limited = $cardinality === 1 ? 'limited' : '' .
    $element += [
      '#type' => 'entity_autocomplete_tagify',
      '#default_value' => $default_value,
+4 −5
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
namespace Drupal\tagify;

use Drupal\Component\Utility\Html;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManagerInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
@@ -51,7 +50,7 @@ class TagifyEntityAutocompleteMatcher implements TagifyEntityAutocompleteMatcher
  }

  /**
   * {@inheridoc}
   * {@inheritdoc}
   */
  public function getMatches($target_type, $selection_handler, array $selection_settings, $string = '', array $selected = []) {
    $matches = [];
+1 −0
Original line number Diff line number Diff line
@@ -3,4 +3,5 @@ tagify.entity_autocomplete:
  defaults:
    _controller: '\Drupal\tagify\Controller\TagifyEntityAutocompleteController::handleAutocomplete'
  requirements:
    # Every user have access to the route.
    _access: 'TRUE'