Completed
Push — 8.x-1.x ( fc4997...0b3da9 )
by Janez
01:48
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.
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.
entity_browser.module 2 patches
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.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@  discard block
 block discarded – undo
18 18
   switch ($route_name) {
19 19
     case 'help.page.entity_browser':
20 20
       $output = '';
21
-      $output .= '<h3>' . t('About') . '</h3>';
22
-      $output .= '<p>' . t('The Entity Browser module provides a generic entity browser/picker/selector. It can be used in any context where one needs to select a few entities and do something with them. For more information, see the online documentation for <a href=":entity_browser-documentation">Entity Browser</a>.', array(':entity_browser-documentation' => 'https://drupal-media.gitbooks.io/drupal8-guide/content/modules/entity_browser/intro.html')) . '</p>';
23
-      $output .= '<h3>' . t('Uses') . '</h3>';
21
+      $output .= '<h3>'.t('About').'</h3>';
22
+      $output .= '<p>'.t('The Entity Browser module provides a generic entity browser/picker/selector. It can be used in any context where one needs to select a few entities and do something with them. For more information, see the online documentation for <a href=":entity_browser-documentation">Entity Browser</a>.', array(':entity_browser-documentation' => 'https://drupal-media.gitbooks.io/drupal8-guide/content/modules/entity_browser/intro.html')).'</p>';
23
+      $output .= '<h3>'.t('Uses').'</h3>';
24 24
       $output .= '<dl>';
25
-      $output .= '<dt>' . t('General') . '</dt>';
26
-      $output .= '<dd>' . t('Entity browser comes with an example module that can be used as a starting point.') . '</dd>';
27
-      $output .= '<dt>' . t('Example use cases') . '</dt>';
28
-      $output .= '<dd>' . t('Powerfull entity reference widget') . '</dd>';
29
-      $output .= '<dd>' . t('Embedding entities into wysiwyg') . '</dd>';
25
+      $output .= '<dt>'.t('General').'</dt>';
26
+      $output .= '<dd>'.t('Entity browser comes with an example module that can be used as a starting point.').'</dd>';
27
+      $output .= '<dt>'.t('Example use cases').'</dt>';
28
+      $output .= '<dd>'.t('Powerfull entity reference widget').'</dd>';
29
+      $output .= '<dd>'.t('Embedding entities into wysiwyg').'</dd>';
30 30
       $output .= '</dl>';
31 31
 
32 32
       return $output;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 /**
67 67
  * Implements hook_form_alter().
68 68
  */
69
-function entity_browser_form_alter(&$form, FormStateInterface &$form_state) {
69
+function entity_browser_form_alter(&$form, FormStateInterface&$form_state) {
70 70
   $entity_browser_dialog_edit = \Drupal::service('request_stack')->getCurrentRequest()->get('_route');
71 71
   if ($entity_browser_dialog_edit == 'entity_browser.edit_form') {
72 72
     // Let's allow the save button only.
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.