Completed
Push — master ( bbc096...38d354 )
by Craig
06:03 queued 21s
created
src/lib/Zikula/Bundle/HookBundle/Tests/Dispatcher/SubscriberBundleTest.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         // Remove the following lines when you implement this test.
52 52
         $this->markTestIncomplete(
53
-          'This test has not been implemented yet.'
53
+            'This test has not been implemented yet.'
54 54
         );
55 55
     }
56 56
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         // Remove the following lines when you implement this test.
64 64
         $this->markTestIncomplete(
65
-          'This test has not been implemented yet.'
65
+            'This test has not been implemented yet.'
66 66
         );
67 67
     }
68 68
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         // Remove the following lines when you implement this test.
76 76
         $this->markTestIncomplete(
77
-          'This test has not been implemented yet.'
77
+            'This test has not been implemented yet.'
78 78
         );
79 79
     }
80 80
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     {
87 87
         // Remove the following lines when you implement this test.
88 88
         $this->markTestIncomplete(
89
-          'This test has not been implemented yet.'
89
+            'This test has not been implemented yet.'
90 90
         );
91 91
     }
92 92
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     {
99 99
         // Remove the following lines when you implement this test.
100 100
         $this->markTestIncomplete(
101
-          'This test has not been implemented yet.'
101
+            'This test has not been implemented yet.'
102 102
         );
103 103
     }
104 104
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         // Remove the following lines when you implement this test.
112 112
         $this->markTestIncomplete(
113
-          'This test has not been implemented yet.'
113
+            'This test has not been implemented yet.'
114 114
         );
115 115
     }
116 116
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     {
123 123
         // Remove the following lines when you implement this test.
124 124
         $this->markTestIncomplete(
125
-          'This test has not been implemented yet.'
125
+            'This test has not been implemented yet.'
126 126
         );
127 127
     }
128 128
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     {
135 135
         // Remove the following lines when you implement this test.
136 136
         $this->markTestIncomplete(
137
-          'This test has not been implemented yet.'
137
+            'This test has not been implemented yet.'
138 138
         );
139 139
     }
140 140
 }
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/HookBundle/Tests/Dispatcher/HookTest.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     {
50 50
         // Remove the following lines when you implement this test.
51 51
         $this->markTestIncomplete(
52
-          'This test has not been implemented yet.'
52
+            'This test has not been implemented yet.'
53 53
         );
54 54
     }
55 55
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     {
62 62
         // Remove the following lines when you implement this test.
63 63
         $this->markTestIncomplete(
64
-          'This test has not been implemented yet.'
64
+            'This test has not been implemented yet.'
65 65
         );
66 66
     }
67 67
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     {
74 74
         // Remove the following lines when you implement this test.
75 75
         $this->markTestIncomplete(
76
-          'This test has not been implemented yet.'
76
+            'This test has not been implemented yet.'
77 77
         );
78 78
     }
79 79
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     {
86 86
         // Remove the following lines when you implement this test.
87 87
         $this->markTestIncomplete(
88
-          'This test has not been implemented yet.'
88
+            'This test has not been implemented yet.'
89 89
         );
90 90
     }
91 91
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     {
98 98
         // Remove the following lines when you implement this test.
99 99
         $this->markTestIncomplete(
100
-          'This test has not been implemented yet.'
100
+            'This test has not been implemented yet.'
101 101
         );
102 102
     }
103 103
 }
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/HookBundle/Tests/Dispatcher/ProviderBundleTest.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         // Remove the following lines when you implement this test.
52 52
         $this->markTestIncomplete(
53
-          'This test has not been implemented yet.'
53
+            'This test has not been implemented yet.'
54 54
         );
55 55
     }
56 56
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         // Remove the following lines when you implement this test.
64 64
         $this->markTestIncomplete(
65
-          'This test has not been implemented yet.'
65
+            'This test has not been implemented yet.'
66 66
         );
67 67
     }
68 68
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         // Remove the following lines when you implement this test.
76 76
         $this->markTestIncomplete(
77
-          'This test has not been implemented yet.'
77
+            'This test has not been implemented yet.'
78 78
         );
79 79
     }
80 80
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     {
87 87
         // Remove the following lines when you implement this test.
88 88
         $this->markTestIncomplete(
89
-          'This test has not been implemented yet.'
89
+            'This test has not been implemented yet.'
90 90
         );
91 91
     }
92 92
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     {
99 99
         // Remove the following lines when you implement this test.
100 100
         $this->markTestIncomplete(
101
-          'This test has not been implemented yet.'
101
+            'This test has not been implemented yet.'
102 102
         );
103 103
     }
104 104
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         // Remove the following lines when you implement this test.
112 112
         $this->markTestIncomplete(
113
-          'This test has not been implemented yet.'
113
+            'This test has not been implemented yet.'
114 114
         );
115 115
     }
116 116
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     {
123 123
         // Remove the following lines when you implement this test.
124 124
         $this->markTestIncomplete(
125
-          'This test has not been implemented yet.'
125
+            'This test has not been implemented yet.'
126 126
         );
127 127
     }
128 128
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     {
135 135
         // Remove the following lines when you implement this test.
136 136
         $this->markTestIncomplete(
137
-          'This test has not been implemented yet.'
137
+            'This test has not been implemented yet.'
138 138
         );
139 139
     }
140 140
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     {
147 147
         // Remove the following lines when you implement this test.
148 148
         $this->markTestIncomplete(
149
-          'This test has not been implemented yet.'
149
+            'This test has not been implemented yet.'
150 150
         );
151 151
     }
152 152
 }
Please login to merge, or discard this patch.
Zikula/Bundle/HookBundle/Dispatcher/Storage/Doctrine/DoctrineStorage.php 2 patches
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
     public function getSubscriberByEventName($eventName)
73 73
     {
74 74
         return $this->em->createQueryBuilder()->select('t')
75
-                 ->from('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookSubscriberEntity', 't')
76
-                 ->where('t.eventname = ?1')
77
-                 ->getQuery()->setParameter(1, $eventName)
78
-                 ->getArrayResult();
75
+                    ->from('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookSubscriberEntity', 't')
76
+                    ->where('t.eventname = ?1')
77
+                    ->getQuery()->setParameter(1, $eventName)
78
+                    ->getArrayResult();
79 79
     }
80 80
 
81 81
     public function unregisterSubscriberByArea($areaName)
@@ -88,24 +88,24 @@  discard block
 block discarded – undo
88 88
 
89 89
         // delete subscriber entry
90 90
         $this->em->createQueryBuilder()
91
-                 ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookSubscriberEntity', 't')
92
-                 ->where('t.sareaid = ?1')
93
-                 ->getQuery()->setParameter(1, $areaId)
94
-                 ->execute();
91
+                    ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookSubscriberEntity', 't')
92
+                    ->where('t.sareaid = ?1')
93
+                    ->getQuery()->setParameter(1, $areaId)
94
+                    ->execute();
95 95
 
96 96
         // remove bindings
97 97
         $this->em->createQueryBuilder()
98
-                 ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookBindingEntity', 't')
99
-                 ->where('t.sareaid = ?1')
100
-                 ->getQuery()->setParameter(1, $areaId)
101
-                 ->execute();
98
+                    ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookBindingEntity', 't')
99
+                    ->where('t.sareaid = ?1')
100
+                    ->getQuery()->setParameter(1, $areaId)
101
+                    ->execute();
102 102
 
103 103
         // clean areas
104 104
         $this->em->createQueryBuilder()
105
-                 ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity', 't')
106
-                 ->where('t.id = ?1')
107
-                 ->getQuery()->setParameter(1, $areaId)
108
-                 ->execute();
105
+                    ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity', 't')
106
+                    ->where('t.id = ?1')
107
+                    ->getQuery()->setParameter(1, $areaId)
108
+                    ->execute();
109 109
 
110 110
         $this->generateRuntimeHandlers();
111 111
     }
@@ -164,24 +164,24 @@  discard block
 block discarded – undo
164 164
 
165 165
         // delete provider entry
166 166
         $this->em->createQueryBuilder()
167
-                 ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookProviderEntity', 't')
168
-                 ->where('t.pareaid = ?1')
169
-                 ->getQuery()->setParameter(1, $areaId)
170
-                 ->execute();
167
+                    ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookProviderEntity', 't')
168
+                    ->where('t.pareaid = ?1')
169
+                    ->getQuery()->setParameter(1, $areaId)
170
+                    ->execute();
171 171
 
172 172
         // remove bindings
173 173
         $this->em->createQueryBuilder()
174
-                 ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookBindingEntity', 't')
175
-                 ->where('t.pareaid = ?1')
176
-                 ->getQuery()->setParameter(1, $areaId)
177
-                 ->execute();
174
+                    ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookBindingEntity', 't')
175
+                    ->where('t.pareaid = ?1')
176
+                    ->getQuery()->setParameter(1, $areaId)
177
+                    ->execute();
178 178
 
179 179
         // clean area
180 180
         $this->em->createQueryBuilder()
181
-                 ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity', 't')
182
-                 ->where('t.id = ?1')
183
-                 ->getQuery()->setParameter(1, $areaId)
184
-                 ->execute();
181
+                    ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity', 't')
182
+                    ->where('t.id = ?1')
183
+                    ->getQuery()->setParameter(1, $areaId)
184
+                    ->execute();
185 185
 
186 186
         $this->generateRuntimeHandlers();
187 187
     }
@@ -239,9 +239,9 @@  discard block
 block discarded – undo
239 239
     {
240 240
         // truncate runtime
241 241
         $this->em->createQueryBuilder()
242
-             ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookRuntimeEntity')
243
-             ->getQuery()
244
-             ->execute();
242
+                ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookRuntimeEntity')
243
+                ->getQuery()
244
+                ->execute();
245 245
 
246 246
         foreach ($this->getBindings() as $binding) {
247 247
             $this->addRuntimeHandlers($binding['sareaid'], $binding['pareaid']);
@@ -251,9 +251,9 @@  discard block
 block discarded – undo
251 251
     private function addRuntimeHandlers($subscriberAreaId, $providerAreaId)
252 252
     {
253 253
         $sa = $this->em->find('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity',
254
-                              $subscriberAreaId);
254
+                                $subscriberAreaId);
255 255
         $pa = $this->em->find('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity',
256
-                              $providerAreaId);
256
+                                $providerAreaId);
257 257
 
258 258
         $subscribers = $this->em->createQueryBuilder()->select('t')
259 259
                             ->from('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookSubscriberEntity', 't')
@@ -267,10 +267,10 @@  discard block
 block discarded – undo
267 267
 
268 268
         foreach ($subscribers as $subscriber) {
269 269
             $provider = $this->em->createQueryBuilder()->select('t')
270
-                             ->from('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookProviderEntity', 't')
271
-                             ->where('t.pareaid = ?1 AND t.hooktype = ?2')
272
-                             ->getQuery()->setParameters([1 => $providerAreaId, 2 => $subscriber['hooktype']])
273
-                             ->getArrayResult();
270
+                                ->from('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookProviderEntity', 't')
271
+                                ->where('t.pareaid = ?1 AND t.hooktype = ?2')
272
+                                ->getQuery()->setParameters([1 => $providerAreaId, 2 => $subscriber['hooktype']])
273
+                                ->getArrayResult();
274 274
 
275 275
             if ($provider) {
276 276
                 $provider = $provider[0];
@@ -298,9 +298,9 @@  discard block
 block discarded – undo
298 298
     {
299 299
         $this->runtimeHandlers =
300 300
             $this->em->createQueryBuilder()->select('t')
301
-                 ->from('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookRuntimeEntity', 't')
302
-                 ->getQuery()
303
-                 ->getArrayResult();
301
+                    ->from('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookRuntimeEntity', 't')
302
+                    ->getQuery()
303
+                    ->getArrayResult();
304 304
 
305 305
         return $this->runtimeHandlers;
306 306
     }
@@ -308,9 +308,9 @@  discard block
 block discarded – undo
308 308
     public function bindSubscriber($subscriberArea, $providerArea)
309 309
     {
310 310
         $sa = $this->em->getRepository('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity')
311
-                   ->findOneBy(['areaname' => $subscriberArea]);
311
+                    ->findOneBy(['areaname' => $subscriberArea]);
312 312
         $pa = $this->em->getRepository('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity')
313
-                   ->findOneBy(['areaname' => $providerArea]);
313
+                    ->findOneBy(['areaname' => $providerArea]);
314 314
 
315 315
         if ($sa->getCategory() != $pa->getCategory()) {
316 316
             throw new \LogicException('Cannot bind areas from different categories.');
@@ -334,18 +334,18 @@  discard block
 block discarded – undo
334 334
     public function unbindSubscriber($subscriberArea, $providerArea)
335 335
     {
336 336
         $sa = $this->em->getRepository('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity')
337
-                   ->findOneBy(['areaname' => $subscriberArea]);
337
+                    ->findOneBy(['areaname' => $subscriberArea]);
338 338
         $pa = $this->em->getRepository('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity')
339
-                   ->findOneBy(['areaname' => $providerArea]);
339
+                    ->findOneBy(['areaname' => $providerArea]);
340 340
 
341 341
         $subscriberAreaId = $sa->getId();
342 342
         $providerAreaId = $pa->getId();
343 343
 
344 344
         $this->em->createQueryBuilder()
345
-                 ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookBindingEntity', 't')
346
-                 ->where('t.pareaid = ?1 AND t.sareaid = ?2')
347
-                 ->getQuery()->setParameters([1 => $providerAreaId, 2 => $subscriberAreaId])
348
-                 ->execute();
345
+                    ->delete('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookBindingEntity', 't')
346
+                    ->where('t.pareaid = ?1 AND t.sareaid = ?2')
347
+                    ->getQuery()->setParameters([1 => $providerAreaId, 2 => $subscriberAreaId])
348
+                    ->execute();
349 349
 
350 350
         $this->generateRuntimeHandlers();
351 351
     }
@@ -357,16 +357,16 @@  discard block
 block discarded – undo
357 357
         $order->add('t.sortorder', 'ASC');
358 358
 
359 359
         return $this->em->createQueryBuilder()->select('t')
360
-                 ->from('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookBindingEntity', 't')
361
-                 ->orderBy($order)
362
-                 ->getQuery()
363
-                 ->getArrayResult();
360
+                    ->from('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookBindingEntity', 't')
361
+                    ->orderBy($order)
362
+                    ->getQuery()
363
+                    ->getArrayResult();
364 364
     }
365 365
 
366 366
     public function getBindingsFor($areaName)
367 367
     {
368 368
         $area = $this->em->getRepository('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity')
369
-                     ->findOneBy(['areaname' => $areaName]);
369
+                        ->findOneBy(['areaname' => $areaName]);
370 370
 
371 371
         if (!$area) {
372 372
             return [];
@@ -382,11 +382,11 @@  discard block
 block discarded – undo
382 382
         $order->add('t.sortorder', 'ASC');
383 383
         $order->add('t.sareaid', 'ASC');
384 384
         $results = $this->em->createQueryBuilder()->select('t')
385
-                         ->from('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookBindingEntity', 't')
386
-                         ->where("t.$areaIdField = ?1")
387
-                         ->orderBy($order)
388
-                         ->getQuery()->setParameter(1, $area->getId())
389
-                         ->getArrayResult();
385
+                            ->from('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookBindingEntity', 't')
386
+                            ->where("t.$areaIdField = ?1")
387
+                            ->orderBy($order)
388
+                            ->getQuery()->setParameter(1, $area->getId())
389
+                            ->getArrayResult();
390 390
 
391 391
         // this could be an area where related entities would help CAH - 23 Oct 2013
392 392
         $areas = [];
@@ -413,18 +413,18 @@  discard block
 block discarded – undo
413 413
         foreach ($providerAreaNames as $name) {
414 414
             $providerAreaIds[] =
415 415
                 $this->em->getRepository('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity')
416
-                     ->findOneBy(['areaname' => $name])
417
-                     ->getId();
416
+                        ->findOneBy(['areaname' => $name])
417
+                        ->getId();
418 418
         }
419 419
 
420 420
         // sort bindings in order of appearance from $providerAreaIds
421 421
         $counter = 1;
422 422
         foreach ($providerAreaIds as $id) {
423 423
             $this->em->createQueryBuilder()
424
-                 ->update('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookBindingEntity', 't')
425
-                 ->set('t.sortorder', $counter)
426
-                 ->where('t.sareaid = ?1 AND t.pareaid = ?2')
427
-                 ->getQuery()->setParameters([1 => $sareaId, 2 => $id])
424
+                    ->update('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookBindingEntity', 't')
425
+                    ->set('t.sortorder', $counter)
426
+                    ->where('t.sareaid = ?1 AND t.pareaid = ?2')
427
+                    ->getQuery()->setParameters([1 => $sareaId, 2 => $id])
428 428
                 ->execute();
429 429
             $counter++;
430 430
         }
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 
472 472
         $subscribers =
473 473
             $this->em->getRepository('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookSubscriberEntity')
474
-                 ->findBy(['sareaid' => $sareaId]);
474
+                    ->findBy(['sareaid' => $sareaId]);
475 475
 
476 476
         if (!$subscribers) {
477 477
             return false;
@@ -482,8 +482,8 @@  discard block
 block discarded – undo
482 482
         foreach ($subscribers as $subscriber) {
483 483
             $pareaId =
484 484
                 $this->em->getRepository('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity')
485
-                     ->findOneBy(['areaname' => $providerArea])
486
-                     ->getId();
485
+                        ->findOneBy(['areaname' => $providerArea])
486
+                        ->getId();
487 487
 
488 488
             $hookprovider =
489 489
                 $this->em->createQueryBuilder()->select('t')
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
                         2 => $subscriber->getHooktype(),
495 495
                         3 => $subscriber->getCategory()
496 496
                     ])
497
-                     ->getArrayResult();
497
+                        ->getArrayResult();
498 498
 
499 499
             if ($hookprovider) {
500 500
                 $allow = true;
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
     public function getAreaId($areaName)
543 543
     {
544 544
         $hookArea = $this->em->getRepository('Zikula\Bundle\HookBundle\Dispatcher\Storage\Doctrine\Entity\HookAreaEntity')
545
-                   ->findOneBy(['areaname' => $areaName]);
545
+                    ->findOneBy(['areaname' => $areaName]);
546 546
 
547 547
         if (!$hookArea) {
548 548
             return false;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -374,7 +374,8 @@
 block discarded – undo
374 374
 
375 375
         if ($area->getAreatype() == self::PROVIDER) {
376 376
             $areaIdField = 'pareaid';
377
-        } else { // $area->getAreatype() == self::SUBSCRIBER
377
+        } else {
378
+// $area->getAreatype() == self::SUBSCRIBER
378 379
             $areaIdField = 'sareaid';
379 380
         }
380 381
 
Please login to merge, or discard this patch.
src/system/RoutesModule/Base/AbstractRoutesModuleInstaller.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
     /**
130 130
      * Build array with all entity classes for ZikulaRoutesModule.
131 131
      *
132
-     * @return array list of class names
132
+     * @return string[] list of class names
133 133
      */
134 134
     protected function listEntityClasses()
135 135
     {
Please login to merge, or discard this patch.
src/system/PermissionsModule/Twig/Extension/PermissionsExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,6 +62,6 @@
 block discarded – undo
62 62
 
63 63
         $result = $this->container->get('zikula_permissions_module.api.permission')->hasPermission($component, $instance, constant($level));
64 64
 
65
-        return (bool) $result;
65
+        return (bool)$result;
66 66
     }
67 67
 }
Please login to merge, or discard this patch.
src/system/GroupsModule/Controller/MembershipController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
         if ($gid < 1 || $uid < 1) {
133 133
             throw new \InvalidArgumentException($this->__('Invalid Group ID or User ID.'));
134 134
         }
135
-        if (!$this->hasPermission('ZikulaGroupsModule::', $gid.'::', ACCESS_EDIT)) {
135
+        if (!$this->hasPermission('ZikulaGroupsModule::', $gid . '::', ACCESS_EDIT)) {
136 136
             throw new AccessDeniedException();
137 137
         }
138 138
         $group = $this->get('zikula_groups_module.group_repository')->find($gid);
Please login to merge, or discard this patch.
src/system/GroupsModule/GroupsModuleInstaller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
         switch ($oldVersion) {
67 67
             case '2.3.2':
68 68
             case '2.4.0':
69
-                $this->setVar('mailwarning', (bool) $this->getVar('mailwarning'));
70
-                $this->setVar('hideclosed', (bool) $this->getVar('hideclosed'));
69
+                $this->setVar('mailwarning', (bool)$this->getVar('mailwarning'));
70
+                $this->setVar('hideclosed', (bool)$this->getVar('hideclosed'));
71 71
                 $this->setVar('hidePrivate', false);
72 72
             case '2.4.1':
73 73
             // future upgrade routines
Please login to merge, or discard this patch.
src/lib/Zikula/Bundle/CoreBundle/Twig/Extension/PagerExtension.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                     case 'lang':
140 140
                         $addcurrentlang2url = $systemVars['languageurl'];
141 141
                         if ($addcurrentlang2url == 0) {
142
-                            $pager['args'][$k] =  $v;
142
+                            $pager['args'][$k] = $v;
143 143
                         }
144 144
                         break;
145 145
                     default:
@@ -161,19 +161,19 @@  discard block
 block discarded – undo
161 161
                                     }
162 162
                                 } elseif (strlen($vv)) {
163 163
                                     $tkey = $k . '[' . $kk . ']';
164
-                                    $pager['args'][$tkey] =  $vv;
164
+                                    $pager['args'][$tkey] = $vv;
165 165
                                 }
166 166
                             }
167 167
                         } else {
168 168
                             if (strlen($v)) {
169
-                                $pager['args'][$k] =  $v;
169
+                                $pager['args'][$k] = $v;
170 170
                             }
171 171
                         }
172 172
                 }
173 173
             }
174 174
         }
175 175
 
176
-        $pagerUrl = function ($pager) use ($routeName, $systemVars) {
176
+        $pagerUrl = function($pager) use ($routeName, $systemVars) {
177 177
             if ($routeName) {
178 178
                 return $this->container->get('router')->generate($routeName, $pager['args']);
179 179
             }
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
             // predefined abc
374 374
             if (strtolower($params['skin']) == 'hu') {
375 375
                 // Hungarian
376
-                $pager['names']  = $pager['values'] = ['A', '?', 'B', 'C', 'D', 'E', '?', 'F', 'G', 'H', 'I', '?', 'J', 'K', 'L', 'M', 'N', 'O', '?', '?', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', '?', '?', 'U', 'V', 'W', 'X', 'Y', 'Z'];
376
+                $pager['names'] = $pager['values'] = ['A', '?', 'B', 'C', 'D', 'E', '?', 'F', 'G', 'H', 'I', '?', 'J', 'K', 'L', 'M', 'N', 'O', '?', '?', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', '?', '?', 'U', 'V', 'W', 'X', 'Y', 'Z'];
377 377
                 //$params['names']  = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U'    ,'V','W','X','Y','Z');
378 378
                 //$params['values'] = array('A,?','B','C','D','E,?','F','G','H','I,?','J','K','L','M','N','O,?,?,O','P','Q','R','S','T','U,?,?,U','V','W','X','Y','Z');
379 379
             } else {
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
         unset($params['names']);
388 388
         unset($params['values']);
389 389
         unset($params['route']);
390
-        $pagerUrl = function ($pager) {
390
+        $pagerUrl = function($pager) {
391 391
             return $this->container->get('router')->generate($pager['route'], $pager['args']);
392 392
         };
393 393
         $allVars = array_merge($request->request->all(), $request->query->all(), $request->attributes->get('_route_params', []));
@@ -418,38 +418,38 @@  discard block
 block discarded – undo
418 418
         }
419 419
         unset($pager['args'][$pager['posvar']]);
420 420
         // begin to fill the output
421
-        $output = '<ul class="'.$params['class'].'">'."\n";
421
+        $output = '<ul class="' . $params['class'] . '">' . "\n";
422 422
         $style = '';
423 423
         if ($params['printempty']) {
424 424
             $active = '';
425 425
             if (!empty($params['class_numon'])) {
426 426
                 if (!isset($allVars[$pager['posvar']])) {
427
-                    $style = ' class="'.$params['class_numon'].'"';
427
+                    $style = ' class="' . $params['class_numon'] . '"';
428 428
                     $active = 'class="active"';
429 429
                 } elseif (!empty($params['class_num'])) {
430
-                    $style = ' class="'.$params['class_num'].'"';
430
+                    $style = ' class="' . $params['class_num'] . '"';
431 431
                 } else {
432 432
                     $style = '';
433 433
                 }
434 434
             }
435 435
             $vars[$pager['posvar']] = '';
436
-            $output .= '<li '.$active.'><a '.$style.' href="'.$pagerUrl($pager).'"> -'."\n</a></li>";
436
+            $output .= '<li ' . $active . '><a ' . $style . ' href="' . $pagerUrl($pager) . '"> -' . "\n</a></li>";
437 437
         }
438 438
         $style = '';
439 439
         foreach (array_keys($pager['names']) as $i) {
440 440
             $active = '';
441 441
             if (!empty($params['class_numon'])) {
442 442
                 if (isset($allVars[$pager['posvar']]) && $allVars[$pager['posvar']] == $pager['values'][$i]) {
443
-                    $style = ' class="'.$params['class_numon'].'"';
443
+                    $style = ' class="' . $params['class_numon'] . '"';
444 444
                     $active = 'class="active"';
445 445
                 } elseif (!empty($params['class_num'])) {
446
-                    $style = ' class="'.$params['class_num'].'"';
446
+                    $style = ' class="' . $params['class_num'] . '"';
447 447
                 } else {
448 448
                     $style = '';
449 449
                 }
450 450
             }
451 451
             $pager['args'][$pager['posvar']] = $pager['values'][$i];
452
-            $output .= '<li '.$active.'><a '.$style.' href="'.$pagerUrl($pager).'">'.$pager['names'][$i]."</a></li>\n";
452
+            $output .= '<li ' . $active . '><a ' . $style . ' href="' . $pagerUrl($pager) . '">' . $pager['names'][$i] . "</a></li>\n";
453 453
         }
454 454
         $output .= "</ul>\n";
455 455
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     /**
48 48
      * Returns a list of functions to add to the existing list.
49 49
      *
50
-     * @return array An array of functions
50
+     * @return \Twig_SimpleFunction[] An array of functions
51 51
      */
52 52
     public function getFunctions()
53 53
     {
Please login to merge, or discard this patch.