Completed
Pull Request — 8.x-1.x (#13)
by
unknown
02:30
created
src/CropTypeListBuilder.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
11 11
 use Drupal\Core\Entity\Query\QueryFactory;
12 12
 use Drupal\Core\Entity\EntityTypeInterface;
13
-use Drupal\Core\StringTranslation\TranslatableMarkup;
14 13
 use Symfony\Component\DependencyInjection\ContainerInterface;
15 14
 use Drupal\Core\Entity\EntityStorageInterface;
16 15
 use Drupal\Core\Routing\UrlGeneratorInterface;
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -123,16 +123,16 @@
 block discarded – undo
123 123
     foreach ($this->cropImageStyles as $image_style) {
124 124
       /** @var \Drupal\image\ImageEffectInterface $effect */
125 125
       foreach ($image_style->getEffects() as $effect) {
126
-       if (isset($effect->getConfiguration()['data']['crop_type'])) {
127
-         $crop_type = $effect->getConfiguration()['data']['crop_type'];
128
-         if ($crop_type == $entity->id()) {
129
-           // Add two image styles into the usage list.
130
-           if (count($image_styles) < 2) {
131
-             $usage[] = $image_style->link();
132
-           }
133
-           $image_styles[] = $image_style;
134
-         }
135
-       }
126
+        if (isset($effect->getConfiguration()['data']['crop_type'])) {
127
+          $crop_type = $effect->getConfiguration()['data']['crop_type'];
128
+          if ($crop_type == $entity->id()) {
129
+            // Add two image styles into the usage list.
130
+            if (count($image_styles) < 2) {
131
+              $usage[] = $image_style->link();
132
+            }
133
+            $image_styles[] = $image_style;
134
+          }
135
+        }
136 136
       }
137 137
     }
138 138
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,8 +139,7 @@
 block discarded – undo
139 139
     $other_image_styles = array_splice($image_styles, 2);
140 140
     if ($other_image_styles) {
141 141
       $usage_message = t('@first, @second and @count more', ['@first' => $usage[0], '@second' => $usage[1], '@count' => count($other_image_styles)]);
142
-    }
143
-    else {
142
+    } else {
144 143
       $usage_message = implode(', ', $usage);
145 144
     }
146 145
     $row['usage']['data']['#markup'] = $usage_message;
Please login to merge, or discard this patch.