Completed
Pull Request — 8.x-1.x (#117)
by
unknown
03:25
created
src/Plugin/EntityBrowser/Widget/Upload.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -8,10 +8,7 @@
 block discarded – undo
8 8
 
9 9
 use Drupal\Component\Utility\NestedArray;
10 10
 use Drupal\Core\Form\FormStateInterface;
11
-use Drupal\Core\TypedData\DataDefinition;
12
-use Drupal\Core\TypedData\TypedData;
13 11
 use Drupal\entity_browser\WidgetBase;
14
-use Drupal\file\Plugin\Field\FieldType\FileItem;
15 12
 
16 13
 /**
17 14
  * Uses a view to provide entity listing in a browser's widget.
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
     $uploaded_files = $form_state->getValue(['upload'], []);
57 57
     $trigger = $form_state->getTriggeringElement();
58 58
 
59
-    if (in_array('submit', $trigger['#array_parents'] )) {
59
+    if (in_array('submit', $trigger['#array_parents'])) {
60 60
       $violations = $this->runWidgetValidators($uploaded_files);
61 61
       if (count($violations !== 0)) {
62 62
         /** @var \Symfony\Component\Validator\ConstraintViolationListInterface $violation */
Please login to merge, or discard this patch.
src/Plugin/EntityBrowser/Widget/View.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,9 +77,9 @@
 block discarded – undo
77 77
    * @param \Drupal\Core\Session\AccountInterface $current_user
78 78
    *   The current user.
79 79
    */
80
-   public function __construct(array $configuration, $plugin_id, $plugin_definition, EventDispatcherInterface $event_dispatcher, EntityManagerInterface $entity_manager, AccountInterface $current_user, KeyValueStoreExpirableInterface $key_value, Request $request) {
81
-     parent::__construct($configuration, $plugin_id, $plugin_definition, $event_dispatcher, $entity_manager, $key_value, $request);
82
-     $this->currentUser = $current_user;
80
+    public function __construct(array $configuration, $plugin_id, $plugin_definition, EventDispatcherInterface $event_dispatcher, EntityManagerInterface $entity_manager, AccountInterface $current_user, KeyValueStoreExpirableInterface $key_value, Request $request) {
81
+      parent::__construct($configuration, $plugin_id, $plugin_definition, $event_dispatcher, $entity_manager, $key_value, $request);
82
+      $this->currentUser = $current_user;
83 83
   }
84 84
 
85 85
   /**
Please login to merge, or discard this patch.