Completed
Push — 8.x-1.x ( 6b638e...01d716 )
by Janez
02:35
created
src/Permissions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 
64 64
     foreach ($browsers as $browser) {
65 65
       if ($browser->route()) {
66
-        $permissions['access ' . $browser->id() . ' entity browser pages'] = array(
66
+        $permissions['access '.$browser->id().' entity browser pages'] = array(
67 67
           'title' => $this->translationManager->translate('Access @name pages', array('@name' => $browser->label())),
68 68
           'description' => $this->translationManager->translate('Access pages that %browser uses to operate.', array('%browser' => $browser->label())),
69 69
         );
Please login to merge, or discard this patch.
src/Plugin/EntityBrowser/WidgetSelector/DropDown.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
   /**
25 25
    * {@inheritdoc}
26 26
    */
27
-  public function getForm(array &$form = array(), FormStateInterface &$form_state = NULL) {
27
+  public function getForm(array &$form = array(), FormStateInterface&$form_state = NULL) {
28 28
     // Set a wrapper container for us to replace the form on ajax call.
29 29
     $form['#prefix'] = '<div id="entity-browser-form">';
30 30
     $form['#suffix'] = '</div>';
Please login to merge, or discard this patch.
src/Plugin/EntityBrowser/WidgetSelector/Single.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
   /**
25 25
    * {@inheritdoc}
26 26
    */
27
-  public function getForm(array &$form, FormStateInterface &$form_state) {
27
+  public function getForm(array &$form, FormStateInterface&$form_state) {
28 28
     return array();
29 29
   }
30 30
 
Please login to merge, or discard this patch.
src/Plugin/EntityBrowser/WidgetSelector/Tabs.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@
 block discarded – undo
24 24
   /**
25 25
    * {@inheritdoc}
26 26
    */
27
-  public function getForm(array &$form = array(), FormStateInterface &$form_state = NULL) {
27
+  public function getForm(array &$form = array(), FormStateInterface&$form_state = NULL) {
28 28
     $element = [];
29 29
     foreach ($this->widget_ids as $id => $label) {
30
-      $name = 'tab_selector_' . $id;
30
+      $name = 'tab_selector_'.$id;
31 31
       $element[$name] = array(
32 32
         '#type' => 'button',
33 33
         '#attributes' => ['class' => ['tab']],
Please login to merge, or discard this patch.
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.
entity_browser.module 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 /**
43 43
  * Implements hook_form_alter().
44 44
  */
45
-function entity_browser_form_alter(&$form, FormStateInterface &$form_state) {
45
+function entity_browser_form_alter(&$form, FormStateInterface&$form_state) {
46 46
   $entity_browser_dialog_edit = \Drupal::service('request_stack')->getCurrentRequest()->get('_route');
47 47
   if ($entity_browser_dialog_edit == 'entity_browser.edit_form') {
48 48
     // Let's allow the save button only.
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,8 +122,7 @@
 block discarded – undo
122 122
           $image->save();
123 123
           $file->filesize = $image->getFileSize();
124 124
           drupal_set_message(t('The image was resized to fit within the maximum allowed dimensions of %dimensions pixels.', array('%dimensions' => $maximum_dimensions)));
125
-        }
126
-        else {
125
+        } else {
127 126
           $errors[] = t('The image exceeds the maximum allowed dimensions.');
128 127
         }
129 128
       }
Please login to merge, or discard this patch.
src/Wizard/EntityBrowserWizard.php 1 patch
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,9 +34,7 @@
 block discarded – undo
34 34
    *   The entity manager.
35 35
    * @param $tempstore_id
36 36
    *   The shared temp store factory collection name.
37
-   * @param null $machine_name
38
-   *   The SharedTempStore key for our current wizard values.
39
-   * @param null $step
37
+   * @param string|null $step
40 38
    *   The current active step of the wizard.
41 39
    */
42 40
   public function __construct(SharedTempStoreFactory $tempstore, FormBuilderInterface $builder, ClassResolverInterface $class_resolver, EventDispatcherInterface $event_dispatcher, EntityManagerInterface $entity_manager, RouteMatchInterface $route_match, $tempstore_id, $entity_browser = NULL, $step = 'general') {
Please login to merge, or discard this patch.
src/Plugin/EntityBrowser/Widget/Upload.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
       $files = $this->prepareEntities($form, $form_state);
126 126
       array_walk(
127 127
         $files,
128
-        function (FileInterface $file) {
128
+        function(FileInterface $file) {
129 129
           $file->setPermanent();
130 130
           $file->save();
131 131
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -208,8 +208,7 @@
 block discarded – undo
208 208
       $extensions = implode(' ', array_unique($extensions));
209 209
       if (!preg_match('/^([a-z0-9]+([.][a-z0-9])* ?)+$/', $extensions)) {
210 210
         $form_state->setError($element, t('The list of allowed extensions is not valid, be sure to exclude leading dots and to separate extensions with a comma or space.'));
211
-      }
212
-      else {
211
+      } else {
213 212
         $form_state->setValueForElement($element, $extensions);
214 213
       }
215 214
     }
Please login to merge, or discard this patch.