Completed
Pull Request — master (#450)
by
unknown
02:11
created
Classes/Slots/EventSearch.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         /** @var EventRepository $eventRepository */
62 62
         $eventRepository = GeneralUtility::makeInstance(ObjectManager::class)->get(EventRepository::class);
63 63
         $searchTermHits = $eventRepository->getIdsBySearchTerm($customSearch['fullText']);
64
-        if ( $searchTermHits && count($searchTermHits) ) {
64
+        if ($searchTermHits && count($searchTermHits)) {
65 65
             $indexIds['tx_calendarize_domain_model_event'] = $searchTermHits;
66 66
         }
67 67
         return [
Please login to merge, or discard this patch.
Classes/Domain/Repository/IndexRepository.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -214,8 +214,8 @@
 block discarded – undo
214 214
                 } elseif (is_string($key) && is_int($indexId)) {
215 215
                     // Table based single return value
216 216
                     $tabledIndexIds[] = [
217
-                         'table' => $key,
218
-                         'indexIds' => [$indexId]
217
+                            'table' => $key,
218
+                            'indexIds' => [$indexId]
219 219
                     ];
220 220
                 }
221 221
             }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -222,16 +222,16 @@  discard block
 block discarded – undo
222 222
             $foreignIdConstraints = [];
223 223
             // Old way, just accept foreignUids as provided, not checking the table.
224 224
             // This has a caveat solved with the $tabledIndexIds
225
-            if ( $indexIds ) {
225
+            if ($indexIds) {
226 226
                 $foreignIdConstraints[] = $query->in('foreignUid', $indexIds);
227 227
             }
228
-            if ( $tabledIndexIds ) {
228
+            if ($tabledIndexIds) {
229 229
                 // Handle each table individually on the filters
230 230
                 // allowing for uids to be table specific.
231 231
                 // If 1,3,5 on table_a are ok and 4,5,7 on table_b are ok,
232 232
                 // don't show uid 1 from table_b
233
-                foreach ( $tabledIndexIds as $tabledIndexId ) {
234
-                    if ( $tabledIndexId['indexIds'] ) {
233
+                foreach ($tabledIndexIds as $tabledIndexId) {
234
+                    if ($tabledIndexId['indexIds']) {
235 235
                         // This table has used filters and returned some allowed uids.
236 236
                         // Providing non-existing values e.g.: -1 will remove everything
237 237
                         // unless other elements have found elements with the filters
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                     }
243 243
                 }
244 244
             }
245
-            if ( count($foreignIdConstraints) > 1 ) {
245
+            if (count($foreignIdConstraints) > 1) {
246 246
                 // Multiple valid tables should be grouped by "OR"
247 247
                 // so it's either table_a with uids 1,3,4 OR table_b with uids 1,5,7
248 248
                 $foreignIdConstraint = $query->logicalOr($foreignIdConstraints);
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                 $foreignIdConstraint = array_shift($foreignIdConstraints);
252 252
             }
253 253
             // If any foreignUid constraint survived, use it on the query
254
-            if ( $foreignIdConstraint ) {
254
+            if ($foreignIdConstraint) {
255 255
                 $constraints[] = $foreignIdConstraint;
256 256
             }
257 257
         }
Please login to merge, or discard this patch.