Completed
Push — master ( 58f753...77021e )
by Carsten
08:12 queued 10s
created
Core/test/CoreTest/Queue/Controller/MongoQueueControllerFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
     private $target = MongoQueueControllerFactory::class;
34 34
 
35
-    private $inheritance = [ FactoryInterface::class ];
35
+    private $inheritance = [FactoryInterface::class];
36 36
 
37 37
     public function testCreateService()
38 38
     {
Please login to merge, or discard this patch.
Core/test/CoreTest/Queue/Controller/MongoQueueListControllerFactoryTest.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
 
31 31
     private $target = MongoQueueListControllerFactory::class;
32 32
 
33
-    private $inheritance = [ FactoryInterface::class ];
33
+    private $inheritance = [FactoryInterface::class];
34 34
 
35 35
     public function testCreateService()
36 36
     {
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Queue/Controller/MongoQueueListControllerTest.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     {
112 112
         $queueName = 'test';
113 113
         $queue = $this->getMockBuilder(MongoQueue::class)->disableOriginalConstructor()
114
-                      ->setMethods(['listing'])->getMock();
114
+                        ->setMethods(['listing'])->getMock();
115 115
         $this->queueManager->expects($this->once())->method('get')->with($queueName)->willReturn($queue);
116 116
         $params = $this->setupParamsMock([
117 117
             ['queue', null, $queueName],
@@ -135,13 +135,13 @@  discard block
 block discarded – undo
135 135
         $date = new \DateTime();
136 136
         $date->setTimezone(new \DateTimeZone('UTC'));
137 137
         $jobs = [
138
-           [
139
-               'job' => $job,
140
-               'created' => new \MongoDb\BSON\UTCDateTime($date->getTimestamp() * 1000),
141
-               'executed' => new \MongoDb\BSON\UTCDateTime($date->getTimestamp() * 1000),
142
-               'scheduled' => new \MongoDb\BSON\UTCDateTime($date->getTimestamp() * 1000),
143
-               'tried' => 10,
144
-           ],
138
+            [
139
+                'job' => $job,
140
+                'created' => new \MongoDb\BSON\UTCDateTime($date->getTimestamp() * 1000),
141
+                'executed' => new \MongoDb\BSON\UTCDateTime($date->getTimestamp() * 1000),
142
+                'scheduled' => new \MongoDb\BSON\UTCDateTime($date->getTimestamp() * 1000),
143
+                'tried' => 10,
144
+            ],
145 145
         ];
146 146
 
147 147
         $queue->expects($this->once())->method('listing')->with(['limit' => 10, 'status' => 1])->willReturn($jobs);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         ],
45 45
     ];
46 46
 
47
-    private $inheritance = [ AbstractConsoleController::class ];
47
+    private $inheritance = [AbstractConsoleController::class];
48 48
 
49 49
     private function injectConstructorDependencies()
50 50
     {
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
         $lineTmpl = '%-20s %s';
150 150
         $console = $this->target->getConsole();
151 151
         $console->expects($this->exactly(7))->method('writeLine')->withConsecutive(
152
-            [ get_class($job) . ' [ test ]' ],
153
-            [ sprintf($lineTmpl, 'Created', $date->format('Y-m-d H:i:s')) ],
154
-            [ sprintf($lineTmpl, 'Executed', $date->format('Y-m-d H:i:s')) ],
155
-            [ sprintf($lineTmpl, 'Scheduled', $date->format('Y-m-d H:i:s')) ],
156
-            [ sprintf($lineTmpl, 'Tries', $jobs[0]['tried']) ]
152
+            [get_class($job).' [ test ]'],
153
+            [sprintf($lineTmpl, 'Created', $date->format('Y-m-d H:i:s'))],
154
+            [sprintf($lineTmpl, 'Executed', $date->format('Y-m-d H:i:s'))],
155
+            [sprintf($lineTmpl, 'Scheduled', $date->format('Y-m-d H:i:s'))],
156
+            [sprintf($lineTmpl, 'Tries', $jobs[0]['tried'])]
157 157
         )->willReturn(null);
158 158
 
159 159
         $this->assertEmpty($this->target->listAction());
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Log/Processor/ProcessIdTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
     private $target = ProcessId::class;
29 29
 
30
-    private $inheritance = [ ProcessorInterface::class ];
30
+    private $inheritance = [ProcessorInterface::class];
31 31
 
32 32
     public function testProcessAddsProcessIdToEventArray()
33 33
     {
Please login to merge, or discard this patch.
module/Core/config/module.config.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -76,25 +76,25 @@
 block discarded – undo
76 76
     'log' => array(
77 77
         'Core/Log' => array(
78 78
             'writers' => array(
79
-                 array(
80
-                     'name' => 'stream',
79
+                    array(
80
+                        'name' => 'stream',
81 81
                     'priority' => 1000,
82 82
                     'options' => array(
83
-                         'stream' => getcwd().'/var/log/yawik.log',
83
+                            'stream' => getcwd().'/var/log/yawik.log',
84
+                    ),
84 85
                     ),
85
-                 ),
86 86
             ),
87 87
         ),
88 88
         'Log/Core/Mail' => array(
89 89
             'writers' => array(
90
-                 array(
91
-                     'name' => 'stream',
90
+                    array(
91
+                        'name' => 'stream',
92 92
                     'priority' => 1000,
93 93
                     'options' => array(
94
-                         'stream' => getcwd().'/var/log/mails.log',
94
+                            'stream' => getcwd().'/var/log/mails.log',
95 95
                     ),
96 96
 
97
-                 ),
97
+                    ),
98 98
             ),
99 99
         ),
100 100
         'Log/Core/Queue' => array(
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 use Core\Service\Tracy;
24 24
 use Laminas\I18n\Translator\Resources;
25 25
 
26
-$doctrineConfig = include __DIR__ . '/doctrine.config.php';
26
+$doctrineConfig = include __DIR__.'/doctrine.config.php';
27 27
 
28 28
 
29 29
 return array(
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     ],
64 64
 
65 65
     'options' => [
66
-        'Core/MailServiceOptions' => [ 'class' => '\Core\Options\MailServiceOptions' ],
66
+        'Core/MailServiceOptions' => ['class' => '\Core\Options\MailServiceOptions'],
67 67
     ],
68 68
 
69 69
     'Core' => array(
@@ -341,19 +341,19 @@  discard block
 block discarded – undo
341 341
             'modules/Core/jsonEntityHydrator' => 'Core\Entity\Hydrator\JsonEntityHydratorFactory',
342 342
             'Core/EntityHydrator' => 'Core\Entity\Hydrator\EntityHydratorFactory',
343 343
             'Core/Options' => 'Core\Factory\ModuleOptionsFactory',
344
-            'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class,'factory'],
345
-            'DefaultListeners' => ['Core\Listener\DefaultListener','factory'],
346
-            'templateProviderStrategy'   => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy','factory'],
347
-            'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class,'factory'],
344
+            'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class, 'factory'],
345
+            'DefaultListeners' => ['Core\Listener\DefaultListener', 'factory'],
346
+            'templateProviderStrategy'   => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy', 'factory'],
347
+            'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class, 'factory'],
348 348
             'Core/Listener/CreatePaginator' => 'Core\Listener\CreatePaginatorListener::factory',
349 349
             'Core/Locale' => 'Core\I18n\LocaleFactory',
350 350
             \Core\Listener\AjaxRouteListener::class => \Core\Factory\Listener\AjaxRouteListenerFactory::class,
351 351
             \Core\Listener\DeleteImageSetListener::class => \Core\Factory\Listener\DeleteImageSetListenerFactory::class,
352 352
             'Imagine' => \Core\Factory\Service\ImagineFactory::class,
353
-            'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class,'factory'],
354
-            'Tracy' => [Tracy::class,'factory'],
353
+            'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class, 'factory'],
354
+            'Tracy' => [Tracy::class, 'factory'],
355 355
             Service\EntityEraser\DefaultEntityLoaderListener::class => Service\EntityEraser\DefaultEntityLoaderListenerFactory::class,
356
-            ClearCacheService::class => [ClearCacheService::class,'factory'],
356
+            ClearCacheService::class => [ClearCacheService::class, 'factory'],
357 357
             Listener\ModuleVersionAdminWidgetProvider::class => Listener\ModuleVersionAdminWidgetProviderFactory::class,
358 358
             Queue\Worker\MongoWorker::class => \SlmQueue\Factory\WorkerFactory::class,
359 359
             'Core/HtmlPurifier' => \Core\Factory\Service\HtmlPurifierFactory::class
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
         'translation_file_patterns' => array(
380 380
             [
381 381
                 'type' => 'gettext',
382
-                'base_dir' => __DIR__ . '/../language',
382
+                'base_dir' => __DIR__.'/../language',
383 383
                 'pattern' => '%s.mo',
384 384
             ],
385 385
             [
@@ -424,8 +424,8 @@  discard block
 block discarded – undo
424 424
             'Core/File'    => FileControllerFactory::class,
425 425
             'Core/Content' => LazyControllerFactory::class,
426 426
             Controller\Console\PurgeController::class => Controller\Console\PurgeControllerFactory::class,
427
-            AssetsInstallController::class => [AssetsInstallController::class,'factory'],
428
-            ClearCacheController::class => [ClearCacheController::class,'factory'],
427
+            AssetsInstallController::class => [AssetsInstallController::class, 'factory'],
428
+            ClearCacheController::class => [ClearCacheController::class, 'factory'],
429 429
             Queue\Controller\MongoQueueController::class => Queue\Controller\MongoQueueControllerFactory::class,
430 430
             Queue\Controller\MongoQueueListController::class => Queue\Controller\MongoQueueListControllerFactory::class,
431 431
 
@@ -440,9 +440,9 @@  discard block
 block discarded – undo
440 440
             'Core/SearchForm' => 'Core\Factory\Controller\Plugin\SearchFormFactory',
441 441
             'listquery' => 'Core\Controller\Plugin\ListQuery::factory',
442 442
             'mail' => 'Core\Controller\Plugin\Mail::factory',
443
-            'Core/Mailer' => ['Core\Controller\Plugin\Mailer','factory'],
444
-            'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class,'factory'],
445
-            'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class,'factory'],
443
+            'Core/Mailer' => ['Core\Controller\Plugin\Mailer', 'factory'],
444
+            'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class, 'factory'],
445
+            'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class, 'factory'],
446 446
             Controller\Plugin\EntityEraser::class => Controller\Plugin\EntityEraserFactory::class,
447 447
         ),
448 448
         'invokables' => array(
@@ -473,32 +473,32 @@  discard block
 block discarded – undo
473 473
         'exception_template' => 'error/index',
474 474
         // Map template to files. Speeds up the lookup through the template stack.
475 475
         'template_map' => array(
476
-            'noscript-notice' => __DIR__ . '/../view/layout/_noscript-notice.phtml',
477
-            'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
478
-            'error/404' => __DIR__ . '/../view/error/404.phtml',
479
-            'error/403' => __DIR__ . '/../view/error/403.phtml',
480
-            'error/index' => __DIR__ . '/../view/error/index.phtml',
481
-            'main-navigation' => __DIR__ . '/../view/partial/main-navigation.phtml',
482
-            'pagination-control' => __DIR__ . '/../view/partial/pagination-control.phtml',
483
-            'core/loading-popup' => __DIR__ . '/../view/partial/loading-popup.phtml',
484
-            'core/notifications' => __DIR__ . '/../view/partial/notifications.phtml',
485
-            'form/core/buttons' => __DIR__ . '/../view/form/buttons.phtml',
486
-            'core/social-buttons' => __DIR__ . '/../view/partial/social-buttons.phtml',
487
-            'form/core/privacy' => __DIR__ . '/../view/form/privacy.phtml',
488
-            'core/form/permissions-fieldset' => __DIR__ . '/../view/form/permissions-fieldset.phtml',
489
-            'core/form/permissions-collection' => __DIR__ . '/../view/form/permissions-collection.phtml',
490
-            'core/form/container-view' => __DIR__ . '/../view/form/container.view.phtml',
491
-            'core/form/tree-manage.view' => __DIR__ . '/../view/form/tree-manage.view.phtml',
492
-            'core/form/tree-manage.form' => __DIR__ . '/../view/form/tree-manage.form.phtml',
493
-            'core/form/tree-add-item' => __DIR__ . '/../view/form/tree-add-item.phtml',
494
-            'mail/header' =>  __DIR__ . '/../view/mail/header.phtml',
495
-            'mail/footer' =>  __DIR__ . '/../view/mail/footer.phtml',
496
-            'mail/footer.en' =>  __DIR__ . '/../view/mail/footer.en.phtml',
476
+            'noscript-notice' => __DIR__.'/../view/layout/_noscript-notice.phtml',
477
+            'layout/layout' => __DIR__.'/../view/layout/layout.phtml',
478
+            'error/404' => __DIR__.'/../view/error/404.phtml',
479
+            'error/403' => __DIR__.'/../view/error/403.phtml',
480
+            'error/index' => __DIR__.'/../view/error/index.phtml',
481
+            'main-navigation' => __DIR__.'/../view/partial/main-navigation.phtml',
482
+            'pagination-control' => __DIR__.'/../view/partial/pagination-control.phtml',
483
+            'core/loading-popup' => __DIR__.'/../view/partial/loading-popup.phtml',
484
+            'core/notifications' => __DIR__.'/../view/partial/notifications.phtml',
485
+            'form/core/buttons' => __DIR__.'/../view/form/buttons.phtml',
486
+            'core/social-buttons' => __DIR__.'/../view/partial/social-buttons.phtml',
487
+            'form/core/privacy' => __DIR__.'/../view/form/privacy.phtml',
488
+            'core/form/permissions-fieldset' => __DIR__.'/../view/form/permissions-fieldset.phtml',
489
+            'core/form/permissions-collection' => __DIR__.'/../view/form/permissions-collection.phtml',
490
+            'core/form/container-view' => __DIR__.'/../view/form/container.view.phtml',
491
+            'core/form/tree-manage.view' => __DIR__.'/../view/form/tree-manage.view.phtml',
492
+            'core/form/tree-manage.form' => __DIR__.'/../view/form/tree-manage.form.phtml',
493
+            'core/form/tree-add-item' => __DIR__.'/../view/form/tree-add-item.phtml',
494
+            'mail/header' =>  __DIR__.'/../view/mail/header.phtml',
495
+            'mail/footer' =>  __DIR__.'/../view/mail/footer.phtml',
496
+            'mail/footer.en' =>  __DIR__.'/../view/mail/footer.en.phtml',
497 497
             //'startpage' => __DIR__ . '/../view/layout/startpage.phtml',
498 498
         ),
499 499
         // Where to look for view templates not mapped above
500 500
         'template_path_stack' => array(
501
-            __DIR__ . '/../view',
501
+            __DIR__.'/../view',
502 502
         ),
503 503
     ),
504 504
     'view_helpers' => array(
Please login to merge, or discard this patch.
module/Core/src/Queue/Strategy/LogStrategy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         }
73 73
 
74 74
         if (!is_array($options)) {
75
-            throw new \InvalidArgumentException('Options must be of type array or ' . LoggerInterface::class);
75
+            throw new \InvalidArgumentException('Options must be of type array or '.LoggerInterface::class);
76 76
         }
77 77
 
78 78
         parent::__construct($options);
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
      */
283 283
     private function formatJob(JobInterface $job) : string
284 284
     {
285
-        return get_class($job) . ' [ ' . $job->getId() . ' ] ';
285
+        return get_class($job).' [ '.$job->getId().' ] ';
286 286
     }
287 287
 
288 288
 }
Please login to merge, or discard this patch.
module/Core/src/Queue/Controller/MongoQueueListController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 
75 75
         $lineTmpl = '%-20s %s';
76 76
         foreach ($jobs as $job) {
77
-            $console->writeLine(get_class($job['job']) . ' [ ' . $job['job']->getId() . ' ]');
77
+            $console->writeLine(get_class($job['job']).' [ '.$job['job']->getId().' ]');
78 78
 
79 79
             foreach (['created', 'executed', 'scheduled'] as $key) {
80 80
                 $console->writeLine(sprintf($lineTmpl, ucFirst($key), $job[$key]->toDateTime()->format('Y-m-d H:i:s')));
Please login to merge, or discard this patch.
module/Core/src/Queue/LazyJob.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
             $job = $options ? new $service(...$options) : new $service;
72 72
 
73 73
         } else {
74
-            throw new FatalJobException('A job with name "' . $service . '" could not be created.');
74
+            throw new FatalJobException('A job with name "'.$service.'" could not be created.');
75 75
         }
76 76
 
77 77
         $job->setContent($this->getContent());
Please login to merge, or discard this patch.
module/Jobs/src/Controller/ConsoleController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
         }
57 57
 
58 58
         $date = new \DateTime('today');
59
-        $date->sub(new \DateInterval('P' . $days . 'D'));
59
+        $date->sub(new \DateInterval('P'.$days.'D'));
60 60
 
61
-        $query        = [
61
+        $query = [
62 62
             '$and' => [
63 63
                 ['status.name' => StatusInterface::ACTIVE],
64 64
                 ['$or' => [
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
         }
86 86
 
87 87
         if ($info) {
88
-            echo count($jobs) , ' Jobs';
88
+            echo count($jobs), ' Jobs';
89 89
             if ($offset) {
90
-                echo ' starting from ' . $offset;
90
+                echo ' starting from '.$offset;
91 91
             }
92
-            echo PHP_EOL . PHP_EOL;
92
+            echo PHP_EOL.PHP_EOL;
93 93
             $this->listExpiredJobs($jobs);
94 94
             return;
95 95
         }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 //
101 101
         echo "$count jobs found, which have to expire ...\n";
102 102
         
103
-        $progress     = new ProgressBar(
103
+        $progress = new ProgressBar(
104 104
             new ConsoleAdapter(
105 105
                 array(
106 106
                 'elements' => array(
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
         /* @var \Jobs\Entity\Job $job */
125 125
         foreach ($jobs as $job) {
126
-            $progress->update($i++, 'Job ' . $i . ' / ' . $count);
126
+            $progress->update($i++, 'Job '.$i.' / '.$count);
127 127
 
128 128
             $job->changeStatus('expired');
129 129
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         $i            = 0;
152 152
         /* @var Job $job */
153 153
         foreach ($jobs as $job) {
154
-            $progress->update($i++, 'Job ' . $i . ' / ' . $count);
154
+            $progress->update($i++, 'Job '.$i.' / '.$count);
155 155
             
156 156
             $permissions = $job->getPermissions();
157 157
             $user        = $job->getUser();
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                 continue;
160 160
             }
161 161
             try {
162
-                $group       = $user->getGroup($job->getCompany());
162
+                $group = $user->getGroup($job->getCompany());
163 163
             } catch (\Exception $e) {
164 164
                 continue;
165 165
             }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                 $org = $job->getCompany();
199 199
             }
200 200
             printf(
201
-                '%s   %s   %s   %-30s   %-20s' . PHP_EOL,
201
+                '%s   %s   %s   %-30s   %-20s'.PHP_EOL,
202 202
                 $id,
203 203
                 $job->getDatePublishStart()->format('Y-m-d'),
204 204
                 $job->getDatePublishEnd()->format('Y-m-d'),
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
                 substr($org, 0, 20)
207 207
             );
208 208
         }
209
-        return count($jobs) . ' Jobs.';
209
+        return count($jobs).' Jobs.';
210 210
     }
211 211
 
212 212
     public function pushFetchExternalImagesJobAction()
Please login to merge, or discard this patch.