Passed
Push — master ( ceaf1d...c77583 )
by Mathias
14:53
created
module/Core/test/CoreTest/Queue/Worker/MongoWorkerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,12 +41,12 @@
 block discarded – undo
41 41
     private $target = [
42 42
         MongoWorker::class,
43 43
         'setupConstructorArgs',
44
-        '@testInheritance' => [ 'as_reflection' => true ]
44
+        '@testInheritance' => ['as_reflection' => true]
45 45
     ];
46 46
 
47 47
     private $eventsMock;
48 48
 
49
-    private $inheritance = [ AbstractWorker::class ];
49
+    private $inheritance = [AbstractWorker::class];
50 50
 
51 51
     private function setupConstructorArgs()
52 52
     {
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Queue/Controller/MongoQueueControllerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,5 +30,5 @@
 block discarded – undo
30 30
         'as_reflection' => true,
31 31
     ];
32 32
 
33
-    private $inheritance = [ AbstractWorkerController::class ];
33
+    private $inheritance = [AbstractWorkerController::class];
34 34
 }
Please login to merge, or discard this patch.
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   +38 added lines, -38 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(
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     ],
73 73
 
74 74
     'options' => [
75
-        'Core/MailServiceOptions' => [ 'class' => '\Core\Options\MailServiceOptions' ],
75
+        'Core/MailServiceOptions' => ['class' => '\Core\Options\MailServiceOptions'],
76 76
     ],
77 77
 
78 78
     'Core' => array(
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                     'name' => 'stream',
136 136
                     'priority' => 1000,
137 137
                     'options' => [
138
-                        'stream' => getcwd() . '/var/log/mailqueue.log',
138
+                        'stream' => getcwd().'/var/log/mailqueue.log',
139 139
                         'formatter'  => [
140 140
                             'name' => 'simple',
141 141
                             'options' => [
@@ -371,19 +371,19 @@  discard block
 block discarded – undo
371 371
             'modules/Core/jsonEntityHydrator' => 'Core\Entity\Hydrator\JsonEntityHydratorFactory',
372 372
             'Core/EntityHydrator' => 'Core\Entity\Hydrator\EntityHydratorFactory',
373 373
             'Core/Options' => 'Core\Factory\ModuleOptionsFactory',
374
-            'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class,'factory'],
375
-            'DefaultListeners' => ['Core\Listener\DefaultListener','factory'],
376
-            'templateProviderStrategy'   => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy','factory'],
377
-            'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class,'factory'],
374
+            'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class, 'factory'],
375
+            'DefaultListeners' => ['Core\Listener\DefaultListener', 'factory'],
376
+            'templateProviderStrategy'   => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy', 'factory'],
377
+            'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class, 'factory'],
378 378
             'Core/Listener/CreatePaginator' => 'Core\Listener\CreatePaginatorListener::factory',
379 379
             'Core/Locale' => 'Core\I18n\LocaleFactory',
380 380
             \Core\Listener\AjaxRouteListener::class => \Core\Factory\Listener\AjaxRouteListenerFactory::class,
381 381
             \Core\Listener\DeleteImageSetListener::class => \Core\Factory\Listener\DeleteImageSetListenerFactory::class,
382 382
             'Imagine' => \Core\Factory\Service\ImagineFactory::class,
383
-            'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class,'factory'],
384
-            'Tracy' => [Tracy::class,'factory'],
383
+            'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class, 'factory'],
384
+            'Tracy' => [Tracy::class, 'factory'],
385 385
             Service\EntityEraser\DefaultEntityLoaderListener::class => Service\EntityEraser\DefaultEntityLoaderListenerFactory::class,
386
-            ClearCacheService::class => [ClearCacheService::class,'factory'],
386
+            ClearCacheService::class => [ClearCacheService::class, 'factory'],
387 387
             Listener\ModuleVersionAdminWidgetProvider::class => Listener\ModuleVersionAdminWidgetProviderFactory::class,
388 388
             Queue\Worker\MongoWorker::class => \SlmQueue\Factory\WorkerFactory::class,
389 389
             'Core/HtmlPurifier' => \Core\Factory\Service\HtmlPurifierFactory::class
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
         'translation_file_patterns' => array(
410 410
             [
411 411
                 'type' => 'gettext',
412
-                'base_dir' => __DIR__ . '/../language',
412
+                'base_dir' => __DIR__.'/../language',
413 413
                 'pattern' => '%s.mo',
414 414
             ],
415 415
             [
@@ -454,8 +454,8 @@  discard block
 block discarded – undo
454 454
             'Core/File'    => FileControllerFactory::class,
455 455
             'Core/Content' => LazyControllerFactory::class,
456 456
             Controller\Console\PurgeController::class => Controller\Console\PurgeControllerFactory::class,
457
-            AssetsInstallController::class => [AssetsInstallController::class,'factory'],
458
-            ClearCacheController::class => [ClearCacheController::class,'factory'],
457
+            AssetsInstallController::class => [AssetsInstallController::class, 'factory'],
458
+            ClearCacheController::class => [ClearCacheController::class, 'factory'],
459 459
             Queue\Controller\MongoQueueController::class => Queue\Controller\MongoQueueControllerFactory::class,
460 460
             Queue\Controller\MongoQueueListController::class => Queue\Controller\MongoQueueListControllerFactory::class,
461 461
 
@@ -470,9 +470,9 @@  discard block
 block discarded – undo
470 470
             'Core/SearchForm' => 'Core\Factory\Controller\Plugin\SearchFormFactory',
471 471
             'listquery' => 'Core\Controller\Plugin\ListQuery::factory',
472 472
             'mail' => 'Core\Controller\Plugin\Mail::factory',
473
-            'Core/Mailer' => ['Core\Controller\Plugin\Mailer','factory'],
474
-            'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class,'factory'],
475
-            'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class,'factory'],
473
+            'Core/Mailer' => ['Core\Controller\Plugin\Mailer', 'factory'],
474
+            'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class, 'factory'],
475
+            'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class, 'factory'],
476 476
             Controller\Plugin\EntityEraser::class => Controller\Plugin\EntityEraserFactory::class,
477 477
         ),
478 478
         'invokables' => array(
@@ -503,32 +503,32 @@  discard block
 block discarded – undo
503 503
         'exception_template' => 'error/index',
504 504
         // Map template to files. Speeds up the lookup through the template stack.
505 505
         'template_map' => array(
506
-            'noscript-notice' => __DIR__ . '/../view/layout/_noscript-notice.phtml',
507
-            'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
508
-            'error/404' => __DIR__ . '/../view/error/404.phtml',
509
-            'error/403' => __DIR__ . '/../view/error/403.phtml',
510
-            'error/index' => __DIR__ . '/../view/error/index.phtml',
511
-            'main-navigation' => __DIR__ . '/../view/partial/main-navigation.phtml',
512
-            'pagination-control' => __DIR__ . '/../view/partial/pagination-control.phtml',
513
-            'core/loading-popup' => __DIR__ . '/../view/partial/loading-popup.phtml',
514
-            'core/notifications' => __DIR__ . '/../view/partial/notifications.phtml',
515
-            'form/core/buttons' => __DIR__ . '/../view/form/buttons.phtml',
516
-            'core/social-buttons' => __DIR__ . '/../view/partial/social-buttons.phtml',
517
-            'form/core/privacy' => __DIR__ . '/../view/form/privacy.phtml',
518
-            'core/form/permissions-fieldset' => __DIR__ . '/../view/form/permissions-fieldset.phtml',
519
-            'core/form/permissions-collection' => __DIR__ . '/../view/form/permissions-collection.phtml',
520
-            'core/form/container-view' => __DIR__ . '/../view/form/container.view.phtml',
521
-            'core/form/tree-manage.view' => __DIR__ . '/../view/form/tree-manage.view.phtml',
522
-            'core/form/tree-manage.form' => __DIR__ . '/../view/form/tree-manage.form.phtml',
523
-            'core/form/tree-add-item' => __DIR__ . '/../view/form/tree-add-item.phtml',
524
-            'mail/header' =>  __DIR__ . '/../view/mail/header.phtml',
525
-            'mail/footer' =>  __DIR__ . '/../view/mail/footer.phtml',
526
-            'mail/footer.en' =>  __DIR__ . '/../view/mail/footer.en.phtml',
506
+            'noscript-notice' => __DIR__.'/../view/layout/_noscript-notice.phtml',
507
+            'layout/layout' => __DIR__.'/../view/layout/layout.phtml',
508
+            'error/404' => __DIR__.'/../view/error/404.phtml',
509
+            'error/403' => __DIR__.'/../view/error/403.phtml',
510
+            'error/index' => __DIR__.'/../view/error/index.phtml',
511
+            'main-navigation' => __DIR__.'/../view/partial/main-navigation.phtml',
512
+            'pagination-control' => __DIR__.'/../view/partial/pagination-control.phtml',
513
+            'core/loading-popup' => __DIR__.'/../view/partial/loading-popup.phtml',
514
+            'core/notifications' => __DIR__.'/../view/partial/notifications.phtml',
515
+            'form/core/buttons' => __DIR__.'/../view/form/buttons.phtml',
516
+            'core/social-buttons' => __DIR__.'/../view/partial/social-buttons.phtml',
517
+            'form/core/privacy' => __DIR__.'/../view/form/privacy.phtml',
518
+            'core/form/permissions-fieldset' => __DIR__.'/../view/form/permissions-fieldset.phtml',
519
+            'core/form/permissions-collection' => __DIR__.'/../view/form/permissions-collection.phtml',
520
+            'core/form/container-view' => __DIR__.'/../view/form/container.view.phtml',
521
+            'core/form/tree-manage.view' => __DIR__.'/../view/form/tree-manage.view.phtml',
522
+            'core/form/tree-manage.form' => __DIR__.'/../view/form/tree-manage.form.phtml',
523
+            'core/form/tree-add-item' => __DIR__.'/../view/form/tree-add-item.phtml',
524
+            'mail/header' =>  __DIR__.'/../view/mail/header.phtml',
525
+            'mail/footer' =>  __DIR__.'/../view/mail/footer.phtml',
526
+            'mail/footer.en' =>  __DIR__.'/../view/mail/footer.en.phtml',
527 527
             //'startpage' => __DIR__ . '/../view/layout/startpage.phtml',
528 528
         ),
529 529
         // Where to look for view templates not mapped above
530 530
         'template_path_stack' => array(
531
-            __DIR__ . '/../view',
531
+            __DIR__.'/../view',
532 532
         ),
533 533
     ),
534 534
     '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.