Completed
Push — develop ( 9659b8...659b85 )
by Mathias
31:55 queued 13:03
created
module/Core/src/Core/Controller/Plugin/EntityEraser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
 
112 112
         $event = $this->loadEntitiesEvents->getEvent($entity, $this, $params);
113 113
         $responses = $this->loadEntitiesEvents->triggerEventUntil(
114
-            function ($response) { return (is_array($response) || $response instanceOf \Traversable) && count($response); },
114
+            function($response) { return (is_array($response) || $response instanceOf \Traversable) && count($response); },
115 115
             $event
116 116
         );
117 117
 
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Console/PurgeController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -71,35 +71,35 @@  discard block
 block discarded – undo
71 71
         if (!$this->params('no-check')) {
72 72
 
73 73
 
74
-            $console->writeLine('Checking dependencies ... ' . PHP_EOL);
74
+            $console->writeLine('Checking dependencies ... '.PHP_EOL);
75 75
 
76 76
             $eraser = $this->plugin(EntityEraser::class);
77 77
             $counts = [];
78 78
             $totalCount = 0;
79 79
             foreach ($entities as $entity) {
80
-                $console->writeLine('    ' . $this->entityToString($entity));
80
+                $console->writeLine('    '.$this->entityToString($entity));
81 81
                 $totalCount += 1;
82 82
                 $dependencies = $eraser->checkDependencies($entity);
83 83
 
84 84
                 foreach ($dependencies as $dependencyList) {
85
-                    $console->writeLine('        ' . $dependencyList->getName() . ': ' . $dependencyList->getDescription());
85
+                    $console->writeLine('        '.$dependencyList->getName().': '.$dependencyList->getDescription());
86 86
                     $dependendEntities = $dependencyList->getEntities();
87 87
                     $totalCount += count($dependendEntities);
88 88
                     if (!isset($counts[$dependencyList->getName()])) { $counts[$dependencyList->getName()] = 0; }
89 89
                     $counts[$dependencyList->getName()] += count($dependendEntities);
90 90
 
91 91
                     foreach ($dependendEntities as $dependendEntity) {
92
-                        $console->writeLine('        - ' . $this->entityToString($dependendEntity));
92
+                        $console->writeLine('        - '.$this->entityToString($dependendEntity));
93 93
                     }
94 94
                     $console->writeLine(' ');
95 95
                 }
96 96
                 $console->writeLine('');
97 97
             }
98 98
 
99
-            $console->writeLine($totalCount . ' entities affected:');
100
-            $console->writeLine('    ' . count($entities) . ' ' . $this->params('entity'));
99
+            $console->writeLine($totalCount.' entities affected:');
100
+            $console->writeLine('    '.count($entities).' '.$this->params('entity'));
101 101
             foreach ($counts as $name => $count) {
102
-                $console->writeLine('    ' . $count . ' ' . $name);
102
+                $console->writeLine('    '.$count.' '.$name);
103 103
             }
104 104
 
105 105
             $console->writeLine('');
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         $totalCount = 0;
116 116
         $counts = [];
117 117
 
118
-        $progress     = new ProgressBar(count($entities));
118
+        $progress = new ProgressBar(count($entities));
119 119
         $i = 0;
120 120
         foreach ($entities as $entity) {
121 121
             $progress->update(++$i, $entity->getId());
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
 
132 132
         $progress->finish();
133 133
         $console->writeLine('');
134
-        $console->writeLine('Processed ' . $totalCount . ' entities.');
135
-        $console->writeLine('    ' . count($entities) . ' ' . $this->params('entity') . ' deleted.');
134
+        $console->writeLine('Processed '.$totalCount.' entities.');
135
+        $console->writeLine('    '.count($entities).' '.$this->params('entity').' deleted.');
136 136
         foreach ($counts as $name => $count) {
137
-            $console->writeLine('    ' . $count[0] . ' ' . $name . ' ' . $count[1]);
137
+            $console->writeLine('    '.$count[0].' '.$name.' '.$count[1]);
138 138
         }
139 139
 
140 140
     }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $str = get_class($entity);
181 181
 
182 182
         if ($entity instanceOf \Core\Entity\IdentifiableEntityInterface) {
183
-            $str .= '( ' . $entity->getId() . ' )';
183
+            $str .= '( '.$entity->getId().' )';
184 184
         }
185 185
 
186 186
         return $str;
Please login to merge, or discard this patch.
module/Core/src/Core/Service/EntityEraser/EntityEraserEvents.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function setEventPrototype(EventInterface $prototype)
36 36
     {
37 37
         if (!$prototype instanceOf DependencyResultEvent) {
38
-            throw new \InvalidArgumentException('This event manager only accepts events of the type ' . DependencyResultEvent::class);
38
+            throw new \InvalidArgumentException('This event manager only accepts events of the type '.DependencyResultEvent::class);
39 39
         }
40 40
 
41 41
         parent::setEventPrototype($prototype);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     protected function triggerListeners(EventInterface $event, callable $callback = null)
56 56
     {
57 57
         if (!$event instanceOf DependencyResultEvent) {
58
-            throw new \InvalidArgumentException('This event manager only accepts events of the type ' . DependencyResultEvent::class);
58
+            throw new \InvalidArgumentException('This event manager only accepts events of the type '.DependencyResultEvent::class);
59 59
         }
60 60
 
61 61
         $results = parent::triggerListeners($event, $callback);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@
 block discarded – undo
66 66
             if (null !== $result) {
67 67
                 try { $dependencies->add($result); }
68 68
                 /* silently ignore all invalid results */
69
-                catch (\UnexpectedValueException $e) {}
70
-                catch (\InvalidArgumentException $e) {}
69
+                catch (\UnexpectedValueException $e) {} catch (\InvalidArgumentException $e) {}
71 70
             }
72 71
         }
73 72
 
Please login to merge, or discard this patch.
module/Core/config/module.config.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -43,24 +43,24 @@  discard block
 block discarded – undo
43 43
     'log' => array(
44 44
         'Core/Log' => array(
45 45
             'writers' => array(
46
-                 array(
47
-                     'name' => 'stream',
46
+                    array(
47
+                        'name' => 'stream',
48 48
                     'priority' => 1000,
49 49
                     'options' => array(
50
-                         'stream' => __DIR__ .'/../../../log/yawik.log',
50
+                            'stream' => __DIR__ .'/../../../log/yawik.log',
51
+                    ),
51 52
                     ),
52
-                 ),
53 53
             ),
54 54
         ),
55 55
         'Log/Core/Mail' => array(
56 56
             'writers' => array(
57
-                 array(
58
-                     'name' => 'stream',
57
+                    array(
58
+                        'name' => 'stream',
59 59
                     'priority' => 1000,
60 60
                     'options' => array(
61
-                         'stream' => __DIR__ .'/../../../log/mails.log',
61
+                            'stream' => __DIR__ .'/../../../log/mails.log',
62
+                    ),
62 63
                     ),
63
-                 ),
64 64
             ),
65 65
         ),
66 66
     ),
@@ -317,13 +317,13 @@  discard block
 block discarded – undo
317 317
     ),
318 318
     // Configuration of the controller service manager (Which loads controllers)
319 319
     'controllers' => array(
320
-	    'factories' => [
321
-		    'Core/Index'   => LazyControllerFactory::class,
320
+        'factories' => [
321
+            'Core/Index'   => LazyControllerFactory::class,
322 322
             'Core/Admin'   => AdminControllerFactory::class,
323
-		    'Core/File'    => FileControllerFactory::class,
323
+            'Core/File'    => FileControllerFactory::class,
324 324
             'Core/Content' => LazyControllerFactory::class,
325 325
             Controller\Console\PurgeController::class => Controller\Console\PurgeControllerFactory::class,
326
-	    ],
326
+        ],
327 327
     ),
328 328
     // Configuration of the controller plugin service manager
329 329
     'controller_plugins' => array(
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
             'paginatorservice' => 'Core/PaginatorService',
355 355
             'paginationParams' => 'Core/PaginationParams',
356 356
             'searchform'       => 'Core/SearchForm',
357
-	        'notification'     => 'Notification',
357
+            'notification'     => 'Notification',
358 358
         )
359 359
     ),
360 360
     // Configure the view service manager
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
         ),
453 453
         'aliases' => [
454 454
             'snippet' => \Core\View\Helper\Snippet::class,
455
-	        'ajaxUrl' => \Core\View\Helper\AjaxUrl::class,
455
+            'ajaxUrl' => \Core\View\Helper\AjaxUrl::class,
456 456
             'proxy' => \Core\View\Helper\Proxy::class,
457 457
             'form_element' => 'formElement',
458 458
         ],
@@ -564,17 +564,17 @@  discard block
 block discarded – undo
564 564
         ],
565 565
 
566 566
         'Core/Ajax/Events' => [
567
-	        'service' => 'Core/EventManager',
568
-	        'event'   => \Core\Listener\Events\AjaxEvent::class,
567
+            'service' => 'Core/EventManager',
568
+            'event'   => \Core\Listener\Events\AjaxEvent::class,
569 569
         ],
570 570
 	    
571
-	    'Core/File/Events' => [
572
-		    'service' => 'Core/EventManager',
573
-		    'event' => \Core\Listener\Events\FileEvent::class,
571
+        'Core/File/Events' => [
572
+            'service' => 'Core/EventManager',
573
+            'event' => \Core\Listener\Events\FileEvent::class,
574 574
             'listeners' => [
575 575
                 \Core\Listener\DeleteImageSetListener::class => [\Core\Listener\Events\FileEvent::EVENT_DELETE, -1000],
576 576
             ],
577
-	    ],
577
+        ],
578 578
 
579 579
         'Core/EntityEraser/Dependencies/Events' => [
580 580
             'service' => Service\EntityEraser\EntityEraserEvents::class,
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 use Zend\I18n\Translator\Resources;
20 20
 use Zend\ServiceManager\Factory\InvokableFactory;
21 21
 
22
-$doctrineConfig = include __DIR__ . '/doctrine.config.php';
22
+$doctrineConfig = include __DIR__.'/doctrine.config.php';
23 23
 
24 24
 
25 25
 return array(
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     'doctrine' => $doctrineConfig,
28 28
 
29 29
     'options' => [
30
-        'Core/MailServiceOptions' => [ 'class' => '\Core\Options\MailServiceOptions' ],
30
+        'Core/MailServiceOptions' => ['class' => '\Core\Options\MailServiceOptions'],
31 31
         ],
32 32
     
33 33
     'Core' => array(
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                      'name' => 'stream',
48 48
                     'priority' => 1000,
49 49
                     'options' => array(
50
-                         'stream' => __DIR__ .'/../../../log/yawik.log',
50
+                         'stream' => __DIR__.'/../../../log/yawik.log',
51 51
                     ),
52 52
                  ),
53 53
             ),
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                      'name' => 'stream',
59 59
                     'priority' => 1000,
60 60
                     'options' => array(
61
-                         'stream' => __DIR__ .'/../../../log/mails.log',
61
+                         'stream' => __DIR__.'/../../../log/mails.log',
62 62
                     ),
63 63
                  ),
64 64
             ),
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         'mode' => true, // true = production|false = development|null = autodetect|IP address(es) csv/array
76 76
         'bar' => false, // bool = enabled|Toggle nette diagnostics bar.
77 77
         'strict' => true, // bool = cause immediate death|int = matched against error severity
78
-        'log' => __DIR__ . '/../../../log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files)
78
+        'log' => __DIR__.'/../../../log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files)
79 79
         'email' => null, // in production mode notifies the recipient
80 80
         'email_snooze' => 900 // interval for sending email in seconds
81 81
     ],
@@ -245,16 +245,16 @@  discard block
 block discarded – undo
245 245
             'Core/JsonEntityHydrator' => 'Core\Entity\Hydrator\JsonEntityHydratorFactory',
246 246
             'Core/EntityHydrator' => 'Core\Entity\Hydrator\EntityHydratorFactory',
247 247
             'Core/Options' => 'Core\Factory\ModuleOptionsFactory',
248
-            'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class,'factory'],
249
-            'DefaultListeners' => ['Core\Listener\DefaultListener','factory'],
250
-            'templateProviderStrategy'   => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy','factory'],
251
-            'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class,'factory'],
248
+            'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class, 'factory'],
249
+            'DefaultListeners' => ['Core\Listener\DefaultListener', 'factory'],
250
+            'templateProviderStrategy'   => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy', 'factory'],
251
+            'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class, 'factory'],
252 252
             'Core/Listener/CreatePaginator' => 'Core\Listener\CreatePaginatorListener::factory',
253 253
             'Core/Locale' => 'Core\I18n\LocaleFactory',
254 254
             \Core\Listener\AjaxRouteListener::class => \Core\Factory\Listener\AjaxRouteListenerFactory::class,
255 255
             \Core\Listener\DeleteImageSetListener::class => \Core\Factory\Listener\DeleteImageSetListenerFactory::class,
256 256
             'Imagine' => \Core\Factory\Service\ImagineFactory::class,
257
-            'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class,'factory'],
257
+            'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class, 'factory'],
258 258
             Service\EntityEraser\DefaultEntityLoaderListener::class => Service\EntityEraser\DefaultEntityLoaderListenerFactory::class,
259 259
         ),
260 260
         'abstract_factories' => array(
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         'translation_file_patterns' => array(
279 279
             [
280 280
                 'type' => 'gettext',
281
-                'base_dir' => __DIR__ . '/../language',
281
+                'base_dir' => __DIR__.'/../language',
282 282
                 'pattern' => '%s.mo',
283 283
             ],
284 284
             [
@@ -334,9 +334,9 @@  discard block
 block discarded – undo
334 334
             'Core/SearchForm' => 'Core\Factory\Controller\Plugin\SearchFormFactory',
335 335
             'listquery' => 'Core\Controller\Plugin\ListQuery::factory',
336 336
             'mail' => 'Core\Controller\Plugin\Mail::factory',
337
-            'Core/Mailer' => ['Core\Controller\Plugin\Mailer','factory'],
338
-            'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class,'factory'],
339
-            'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class,'factory'],
337
+            'Core/Mailer' => ['Core\Controller\Plugin\Mailer', 'factory'],
338
+            'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class, 'factory'],
339
+            'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class, 'factory'],
340 340
             Controller\Plugin\EntityEraser::class => Controller\Plugin\EntityEraserFactory::class,
341 341
         ),
342 342
         'invokables' => array(
@@ -367,32 +367,32 @@  discard block
 block discarded – undo
367 367
         'exception_template' => 'error/index',
368 368
         // Map template to files. Speeds up the lookup through the template stack.
369 369
         'template_map' => array(
370
-            'noscript-notice' => __DIR__ . '/../view/layout/_noscript-notice.phtml',
371
-            'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
372
-            'error/404' => __DIR__ . '/../view/error/404.phtml',
373
-            'error/403' => __DIR__ . '/../view/error/403.phtml',
374
-            'error/index' => __DIR__ . '/../view/error/index.phtml',
375
-            'main-navigation' => __DIR__ . '/../view/partial/main-navigation.phtml',
376
-            'pagination-control' => __DIR__ . '/../view/partial/pagination-control.phtml',
377
-            'core/loading-popup' => __DIR__ . '/../view/partial/loading-popup.phtml',
378
-            'core/notifications' => __DIR__ . '/../view/partial/notifications.phtml',
379
-            'form/core/buttons' => __DIR__ . '/../view/form/buttons.phtml',
380
-            'core/social-buttons' => __DIR__ . '/../view/partial/social-buttons.phtml',
381
-            'form/core/privacy' => __DIR__ . '/../view/form/privacy.phtml',
382
-            'core/form/permissions-fieldset' => __DIR__ . '/../view/form/permissions-fieldset.phtml',
383
-            'core/form/permissions-collection' => __DIR__ . '/../view/form/permissions-collection.phtml',
384
-            'core/form/container-view' => __DIR__ . '/../view/form/container.view.phtml',
385
-            'core/form/tree-manage.view' => __DIR__ . '/../view/form/tree-manage.view.phtml',
386
-            'core/form/tree-manage.form' => __DIR__ . '/../view/form/tree-manage.form.phtml',
387
-            'core/form/tree-add-item' => __DIR__ . '/../view/form/tree-add-item.phtml',
388
-            'mail/header' =>  __DIR__ . '/../view/mail/header.phtml',
389
-            'mail/footer' =>  __DIR__ . '/../view/mail/footer.phtml',
390
-            'mail/footer.en' =>  __DIR__ . '/../view/mail/footer.en.phtml',
370
+            'noscript-notice' => __DIR__.'/../view/layout/_noscript-notice.phtml',
371
+            'layout/layout' => __DIR__.'/../view/layout/layout.phtml',
372
+            'error/404' => __DIR__.'/../view/error/404.phtml',
373
+            'error/403' => __DIR__.'/../view/error/403.phtml',
374
+            'error/index' => __DIR__.'/../view/error/index.phtml',
375
+            'main-navigation' => __DIR__.'/../view/partial/main-navigation.phtml',
376
+            'pagination-control' => __DIR__.'/../view/partial/pagination-control.phtml',
377
+            'core/loading-popup' => __DIR__.'/../view/partial/loading-popup.phtml',
378
+            'core/notifications' => __DIR__.'/../view/partial/notifications.phtml',
379
+            'form/core/buttons' => __DIR__.'/../view/form/buttons.phtml',
380
+            'core/social-buttons' => __DIR__.'/../view/partial/social-buttons.phtml',
381
+            'form/core/privacy' => __DIR__.'/../view/form/privacy.phtml',
382
+            'core/form/permissions-fieldset' => __DIR__.'/../view/form/permissions-fieldset.phtml',
383
+            'core/form/permissions-collection' => __DIR__.'/../view/form/permissions-collection.phtml',
384
+            'core/form/container-view' => __DIR__.'/../view/form/container.view.phtml',
385
+            'core/form/tree-manage.view' => __DIR__.'/../view/form/tree-manage.view.phtml',
386
+            'core/form/tree-manage.form' => __DIR__.'/../view/form/tree-manage.form.phtml',
387
+            'core/form/tree-add-item' => __DIR__.'/../view/form/tree-add-item.phtml',
388
+            'mail/header' =>  __DIR__.'/../view/mail/header.phtml',
389
+            'mail/footer' =>  __DIR__.'/../view/mail/footer.phtml',
390
+            'mail/footer.en' =>  __DIR__.'/../view/mail/footer.en.phtml',
391 391
             //'startpage' => __DIR__ . '/../view/layout/startpage.phtml',
392 392
         ),
393 393
         // Where to look for view templates not mapped above
394 394
         'template_path_stack' => array(
395
-            __DIR__ . '/../view',
395
+            __DIR__.'/../view',
396 396
         ),
397 397
     ),
398 398
     'view_helpers' => array(
Please login to merge, or discard this patch.
module/Applications/src/Applications/Listener/LoadDependendEntities.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         if ($entity instanceOf Job) {
37 37
             $entities = $event->getRepository('Applications')->findBy(['isDraft' => null, 'job' => new \MongoId($entity->getId())]);
38 38
 
39
-            return ['Applications', $entities, 'These applications references the job and will also be removed:' ];
39
+            return ['Applications', $entities, 'These applications references the job and will also be removed:'];
40 40
         }
41 41
     }
42 42
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             $repository = $event->getRepository('Applications');
49 49
             $entities = $repository->findBy(['isDraft' => null, 'job' => new \MongoId($entity->getId())]);
50 50
             foreach ($entities as $ent) { $repository->remove($ent); }
51
-            return ['Applications', $entities, 'were removed.' ];
51
+            return ['Applications', $entities, 'were removed.'];
52 52
         }
53 53
     }
54 54
 
Please login to merge, or discard this patch.