Completed
Push — 8.x-1.x ( e3b4ed...18ef99 )
by Janez
03:17
created
src/RouteSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
       /** @var $browser \Drupal\entity_browser\EntityBrowserInterface */
63 63
       $browser = $this->browserStorage->load($id);
64 64
       if ($route = $browser->route()) {
65
-        $collection->add('entity_browser.' . $browser->id(), $route);
65
+        $collection->add('entity_browser.'.$browser->id(), $route);
66 66
       }
67 67
     }
68 68
 
Please login to merge, or discard this patch.
src/WidgetSelectorInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
    * @return array
31 31
    *   Form structure.
32 32
    */
33
-  public function getForm(array &$form, FormStateInterface &$form_state);
33
+  public function getForm(array &$form, FormStateInterface&$form_state);
34 34
 
35 35
   /**
36 36
    * Sets the default widget.
Please login to merge, or discard this patch.
src/EntityBrowserInterface.php 2 patches
Doc Comments   -4 removed lines patch added patch discarded remove patch
@@ -59,8 +59,6 @@  discard block
 block discarded – undo
59 59
   /**
60 60
    * Sets the id of the widget selector plugin
61 61
    *
62
-   * @param string $display
63
-   *   The id of the widget selector plugin.
64 62
    *
65 63
    * @return \Drupal\entity_browser\EntityBrowserInterface
66 64
    *   The class instance this method is called on.
@@ -70,8 +68,6 @@  discard block
 block discarded – undo
70 68
   /**
71 69
    * Sets the id of the selection display plugin
72 70
    *
73
-   * @param string $display
74
-   *   The id of the selection display plugin.
75 71
    *
76 72
    * @return \Drupal\entity_browser\EntityBrowserInterface
77 73
    *   The class instance this method is called on.
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 namespace Drupal\entity_browser;
9 9
 
10 10
 use Drupal\Core\Config\Entity\ConfigEntityInterface;
11
-use Drupal\Core\Form\FormStateInterface;
12 11
 
13 12
 /**
14 13
  * Provides an interface defining an entity browser entity.
Please login to merge, or discard this patch.
src/Form/EntityBrowserForm.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
    * {@inheritdoc}
32 32
    */
33 33
   public function getFormId() {
34
-    return 'entity_browser_' . $this->entity_browser->id() . '_form';
34
+    return 'entity_browser_'.$this->entity_browser->id().'_form';
35 35
   }
36 36
 
37 37
   /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@  discard block
 block discarded – undo
73 73
     $form_state->set('entity_form_initialized', TRUE);
74 74
     if ($this->getRequest()->query->has('uuid')) {
75 75
       $form_state->set(['entity_browser', 'instance_uuid'], $this->getRequest()->query->get('uuid'));
76
-    }
77
-    else {
76
+    } else {
78 77
       $form_state->set(['entity_browser', 'instance_uuid'], $this->uuidGenerator->generate());
79 78
     }
80 79
     $form_state->set(['entity_browser', 'selected_entities'], []);
@@ -161,8 +160,7 @@  discard block
 block discarded – undo
161 160
 
162 161
     if (!$this->isSelectionCompleted($form_state)) {
163 162
       $form_state->setRebuild();
164
-    }
165
-    else {
163
+    } else {
166 164
       $this->entity_browser->getDisplay()->selectionCompleted($this->getSelectedEntities($form_state));
167 165
     }
168 166
   }
Please login to merge, or discard this patch.
src/Controllers/EntityBrowserController.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -116,8 +116,7 @@
 block discarded – undo
116 116
 
117 117
     if (!$this->isSelectionCompleted($form_state)) {
118 118
       $form_state->setRebuild();
119
-    }
120
-    else {
119
+    } else {
121 120
       $entity_browser->getDisplay()->selectionCompleted($this->getSelectedEntities($form_state));
122 121
     }
123 122
   }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,12 +43,12 @@
 block discarded – undo
43 43
       // Return the form as a modal dialog.
44 44
       $form['#attached']['library'][] = 'core/drupal.dialog.ajax';
45 45
       $title = $this->t('Edit entity @entity', ['@entity' => $entity->label()]);
46
-      $response = AjaxResponse::create()->addCommand(new OpenDialogCommand('#' . $entity->getEntityTypeId() . '-' . $entity->id() . '-edit-dialog', $title, $form, ['modal' => TRUE, 'width' => 800]));
46
+      $response = AjaxResponse::create()->addCommand(new OpenDialogCommand('#'.$entity->getEntityTypeId().'-'.$entity->id().'-edit-dialog', $title, $form, ['modal' => TRUE, 'width' => 800]));
47 47
       return $response;
48 48
     }
49 49
     else {
50 50
       // Return command for closing the modal.
51
-      return AjaxResponse::create()->addCommand(new CloseDialogCommand('#' . $entity->getEntityTypeId() . '-' . $entity->id() . '-edit-dialog'));
51
+      return AjaxResponse::create()->addCommand(new CloseDialogCommand('#'.$entity->getEntityTypeId().'-'.$entity->id().'-edit-dialog'));
52 52
     }
53 53
   }
54 54
 
Please login to merge, or discard this patch.
src/Plugin/views/field/SelectForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
    * {@inheritdoc}
24 24
    */
25 25
   public function render(ResultRow $values) {
26
-    return ViewsRenderPipelineMarkup::create('<!--form-item-' . $this->options['id'] . '--' . $values->index . '-->');
26
+    return ViewsRenderPipelineMarkup::create('<!--form-item-'.$this->options['id'].'--'.$values->index.'-->');
27 27
   }
28 28
 
29 29
   /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
           '#type' => 'checkbox',
63 63
           '#title' => $this->t('Select this item'),
64 64
           '#title_display' => 'invisible',
65
-          '#return_value' => $entity->getEntityTypeId() . ':' . $entity->id(),
65
+          '#return_value' => $entity->getEntityTypeId().':'.$entity->id(),
66 66
           '#attributes' => ['name' => "entity_browser_select[$row_index]"],
67 67
           '#default_value' => NULL,
68 68
         ];
Please login to merge, or discard this patch.
src/Form/WidgetsConfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     $form['widget'] = [
76 76
       '#type' => 'select',
77 77
       '#title' => $this->t('Add widget plugin'),
78
-      '#options' => ['_none_' => '- ' . $this->t('Select a widget to add it') . ' -'] + $widgets,
78
+      '#options' => ['_none_' => '- '.$this->t('Select a widget to add it').' -'] + $widgets,
79 79
       '#ajax' => [
80 80
         'callback' => [get_class($this), 'addWidgetCallback'],
81 81
         'wrapper' => 'widgets',
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
       $row['remove'] = [
126 126
         '#type' => 'submit',
127 127
         '#value' => $this->t('Delete'),
128
-        '#name' => 'remove' . $uuid,
128
+        '#name' => 'remove'.$uuid,
129 129
         '#ajax' => [
130 130
           'callback' => [get_class($this), 'addWidgetCallback'],
131 131
           'wrapper' => 'widgets',
Please login to merge, or discard this patch.
src/Form/GeneralInfoConfig.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 use Drupal\entity_browser\SelectionDisplayManager;
14 14
 use Drupal\entity_browser\WidgetManager;
15 15
 use Drupal\entity_browser\WidgetSelectorManager;
16
-use Drupal\user\SharedTempStoreFactory;
17 16
 use Symfony\Component\DependencyInjection\ContainerInterface;
18 17
 
19 18
 /**
Please login to merge, or discard this patch.
src/Tests/ConfigUITest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -137,24 +137,24 @@
 block discarded – undo
137 137
     $this->assertOptionSelected('edit-widget-selector', 'tabs', 'Correct widget selector selected.');
138 138
     $this->assertOptionSelected('edit-selection-display', 'no_display', 'Correct selection display selected.');
139 139
 
140
-    $this->drupalPostForm(NULL,[], 'Next');
140
+    $this->drupalPostForm(NULL, [], 'Next');
141 141
     $this->assertUrl('/admin/config/content/entity_browser/test_entity_browser/display', ['query' => ['js' => 'nojs']]);
142 142
     $this->assertFieldById('edit-width', '100', 'Correct value for width found.');
143 143
     $this->assertFieldById('edit-height', '100', 'Correct value for height found.');
144 144
     $this->assertFieldById('edit-link-text', 'All animals are created equal', 'Correct value for link text found.');
145 145
     $this->assertFieldChecked('edit-auto-open', 'Auto open is enabled.');
146 146
 
147
-    $this->drupalPostForm(NULL,[], 'Next');
147
+    $this->drupalPostForm(NULL, [], 'Next');
148 148
     $this->assertUrl('/admin/config/content/entity_browser/test_entity_browser/widget_selector', ['query' => ['js' => 'nojs']]);
149 149
 
150
-    $this->drupalPostForm(NULL,[], 'Next');
150
+    $this->drupalPostForm(NULL, [], 'Next');
151 151
     $this->assertUrl('/admin/config/content/entity_browser/test_entity_browser/selection_display', ['query' => ['js' => 'nojs']]);
152 152
 
153
-    $this->drupalPostForm(NULL,[], 'Next');
154
-    $this->assertFieldById('edit-table-' . $uuid . '-label', 'upload', 'Correct value for widget label found.');
155
-    $this->assertFieldById('edit-table-' . $uuid . '-form-upload-location', 'public://', 'Correct value for upload location found.');
153
+    $this->drupalPostForm(NULL, [], 'Next');
154
+    $this->assertFieldById('edit-table-'.$uuid.'-label', 'upload', 'Correct value for widget label found.');
155
+    $this->assertFieldById('edit-table-'.$uuid.'-form-upload-location', 'public://', 'Correct value for upload location found.');
156 156
 
157
-    $this->drupalPostForm(NULL,[], 'Finish');
157
+    $this->drupalPostForm(NULL, [], 'Finish');
158 158
 
159 159
     $this->drupalLogout();
160 160
     $this->drupalGet('/admin/config/content/entity_browser/test_entity_browser/general');
Please login to merge, or discard this patch.