@@ -54,7 +54,7 @@ |
||
54 | 54 | 'setter_args' => 'some_id', |
55 | 55 | 'expected' => 'some_id' |
56 | 56 | ]], |
57 | - ['name',[ |
|
57 | + ['name', [ |
|
58 | 58 | 'default' => null, |
59 | 59 | ]], |
60 | 60 | ['uploadDate', [ |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | private $target = ImageSetOptions::class; |
34 | 34 | |
35 | - private $inheritance = [ AbstractOptions::class ]; |
|
35 | + private $inheritance = [AbstractOptions::class]; |
|
36 | 36 | |
37 | 37 | private $properties = [ |
38 | 38 | ['entityClass', [ |
@@ -40,6 +40,6 @@ discard block |
||
40 | 40 | 'setter_args' => Image::class |
41 | 41 | ]], |
42 | 42 | ['formElementName', ['default' => ImageSetInterface::ORIGINAL, 'value' => 'formElementNameValue']], |
43 | - ['images', ['default'=>[ImageSetInterface::THUMBNAIL => [100,100]], 'value' => ['a' => [1,1]]]], |
|
43 | + ['images', ['default'=>[ImageSetInterface::THUMBNAIL => [100, 100]], 'value' => ['a' => [1, 1]]]], |
|
44 | 44 | ]; |
45 | 45 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | ]; |
56 | 56 | |
57 | 57 | /** @noinspection PhpUnusedPrivateFieldInspection */ |
58 | - private $inheritance = [ EventSubscriber::class ]; |
|
58 | + private $inheritance = [EventSubscriber::class]; |
|
59 | 59 | |
60 | 60 | |
61 | 61 | private function getTarget() |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | public function testSubscribesToOnFlushEvent() |
69 | 69 | { |
70 | - $this->assertEquals([ Events::onFlush ], $this->target->getSubscribedEvents()); |
|
70 | + $this->assertEquals([Events::onFlush], $this->target->getSubscribedEvents()); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /* |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | class ConcreteUpdateFilesPermissionsSubScriber extends AbstractUpdateFilesPermissionsSubscriber |
155 | 155 | { |
156 | - protected $filesProperties = [ 'singleFile', 'fileCollection' ]; |
|
156 | + protected $filesProperties = ['singleFile', 'fileCollection']; |
|
157 | 157 | protected $targetDocument = Ufps_TargetDocument::class; |
158 | 158 | } |
159 | 159 |
@@ -28,26 +28,26 @@ |
||
28 | 28 | public function provideFindMethodsTestData() |
29 | 29 | { |
30 | 30 | return [ |
31 | - [ 'findBy', [], 'findBy', ['isDraft' => false] ], |
|
32 | - [ 'findBy', [ 'isDraft' => null ], 'findBy', [] ], |
|
33 | - [ 'findBy', [ 'isDraft' => true ], 'findBy', [ 'isDraft' => true ] ], |
|
34 | - [ 'findBy', [ 'isDraft' => 'something'], 'findBy', ['isDraft' => 'something'] ], |
|
35 | - |
|
36 | - [ 'findDraftsBy', [], 'findBy', ['isDraft' => true]], |
|
37 | - [ 'findDraftsBy', ['isDraft' => null], 'findBy', ['isDraft' => true]], |
|
38 | - [ 'findDraftsBy', ['isDraft' => 'something'], 'findBy', ['isDraft' => true]], |
|
39 | - |
|
40 | - [ 'findOneBy', [], 'findOneBy', ['isDraft' => false] ], |
|
41 | - [ 'findOneBy', [ 'isDraft' => null ], 'findOneBy', [] ], |
|
42 | - [ 'findOneBy', [ 'isDraft' => true ], 'findOneBy', [ 'isDraft' => true ] ], |
|
43 | - [ 'findOneBy', [ 'isDraft' => 'something'], 'findOneBy', ['isDraft' => 'something'] ], |
|
44 | - |
|
45 | - [ 'findOneDraftBy', [], 'findOneBy', ['isDraft' => true]], |
|
46 | - [ 'findOneDraftBy', ['isDraft' => null], 'findOneBy', ['isDraft' => true]], |
|
47 | - [ 'findOneDraftBy', ['isDraft' => 'something'], 'findOneBy', ['isDraft' => true]], |
|
48 | - |
|
49 | - [ 'createDraft', [], 'create', ['isDraft' => true]], |
|
50 | - [ 'createDraft', ['isDraft' => false], 'create', ['isDraft' => true]], |
|
31 | + ['findBy', [], 'findBy', ['isDraft' => false]], |
|
32 | + ['findBy', ['isDraft' => null], 'findBy', []], |
|
33 | + ['findBy', ['isDraft' => true], 'findBy', ['isDraft' => true]], |
|
34 | + ['findBy', ['isDraft' => 'something'], 'findBy', ['isDraft' => 'something']], |
|
35 | + |
|
36 | + ['findDraftsBy', [], 'findBy', ['isDraft' => true]], |
|
37 | + ['findDraftsBy', ['isDraft' => null], 'findBy', ['isDraft' => true]], |
|
38 | + ['findDraftsBy', ['isDraft' => 'something'], 'findBy', ['isDraft' => true]], |
|
39 | + |
|
40 | + ['findOneBy', [], 'findOneBy', ['isDraft' => false]], |
|
41 | + ['findOneBy', ['isDraft' => null], 'findOneBy', []], |
|
42 | + ['findOneBy', ['isDraft' => true], 'findOneBy', ['isDraft' => true]], |
|
43 | + ['findOneBy', ['isDraft' => 'something'], 'findOneBy', ['isDraft' => 'something']], |
|
44 | + |
|
45 | + ['findOneDraftBy', [], 'findOneBy', ['isDraft' => true]], |
|
46 | + ['findOneDraftBy', ['isDraft' => null], 'findOneBy', ['isDraft' => true]], |
|
47 | + ['findOneDraftBy', ['isDraft' => 'something'], 'findOneBy', ['isDraft' => true]], |
|
48 | + |
|
49 | + ['createDraft', [], 'create', ['isDraft' => true]], |
|
50 | + ['createDraft', ['isDraft' => false], 'create', ['isDraft' => true]], |
|
51 | 51 | ]; |
52 | 52 | } |
53 | 53 |
@@ -43,18 +43,18 @@ |
||
43 | 43 | */ |
44 | 44 | public function testInheritance() |
45 | 45 | { |
46 | - $errTmpl = __TRAIT__ . ': ' . get_class($this); |
|
46 | + $errTmpl = __TRAIT__.': '.get_class($this); |
|
47 | 47 | |
48 | 48 | if (!property_exists($this, 'inheritance') || !property_exists($this, 'target')) { |
49 | - throw new Exception($errTmpl . ' must define the properties "$inheritance" and "$target"'); |
|
49 | + throw new Exception($errTmpl.' must define the properties "$inheritance" and "$target"'); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | if (!is_array($this->inheritance)) { |
53 | - throw new Exception($errTmpl . ': Property $inheritance must be an array'); |
|
53 | + throw new Exception($errTmpl.': Property $inheritance must be an array'); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | if (!is_object($this->target)) { |
57 | - throw new Exception($errTmpl . ': Property $target must be an object'); |
|
57 | + throw new Exception($errTmpl.': Property $target must be an object'); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | $this->assertInheritance($this->inheritance, $this->target); |
@@ -132,8 +132,8 @@ discard block |
||
132 | 132 | $testName = array_shift($testNameParts); |
133 | 133 | $testSet = trim(array_pop($testNameParts), '"'); |
134 | 134 | |
135 | - $testNameKey = '@' . $testName; |
|
136 | - $testNameSetKey = $testNameKey . '|' . $testSet; |
|
135 | + $testNameKey = '@'.$testName; |
|
136 | + $testNameSetKey = $testNameKey.'|'.$testSet; |
|
137 | 137 | $testSpec = isset($spec[$testNameKey]) ? $spec[$testNameKey] : (isset($spec[$testNameSetKey]) ? $spec[$testNameSetKey] : null); |
138 | 138 | |
139 | 139 | if (null === $testSpec) { |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | continue; |
143 | 143 | } |
144 | 144 | |
145 | - if (preg_match('~^' . str_replace('*', '.*', substr($testSpecPattern, 1)) . '~', $testName)) { |
|
145 | + if (preg_match('~^'.str_replace('*', '.*', substr($testSpecPattern, 1)).'~', $testName)) { |
|
146 | 146 | $testSpec = $spec[$testSpecPattern]; |
147 | 147 | break; |
148 | 148 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | if (isset($spec[$testSpec])) { |
160 | 160 | $testSpec = $spec[$testSpec]; |
161 | 161 | } elseif (class_exists($testSpec)) { |
162 | - $testSpec = [ $testSpec ]; |
|
162 | + $testSpec = [$testSpec]; |
|
163 | 163 | } else { |
164 | 164 | $this->target = $this->{$testSpec}(); |
165 | 165 | return; |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | |
191 | 191 | if (!isset($spec['class'])) { |
192 | 192 | if (!isset($spec[0])) { |
193 | - throw new Exception(__TRAIT__ . ': No target class name specified.'); |
|
193 | + throw new Exception(__TRAIT__.': No target class name specified.'); |
|
194 | 194 | } |
195 | 195 | $spec['class'] = $spec[0]; |
196 | 196 | } |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | if (is_string($spec)) { |
252 | 252 | $mock = $this->$spec(); |
253 | 253 | } else { |
254 | - $call = function ($spec) { |
|
254 | + $call = function($spec) { |
|
255 | 255 | $cb = [$this, $spec[0]]; |
256 | 256 | $args = isset($spec[1]) ? (array) $spec[1] : []; |
257 | 257 | |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | }; |
260 | 260 | |
261 | 261 | $methods = []; |
262 | - $methodMocks = []; |
|
262 | + $methodMocks = []; |
|
263 | 263 | |
264 | 264 | if (is_array($spec)) { |
265 | 265 | foreach ($spec as $method => $methodSpec) { |
@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | if (!property_exists($this, 'traits') || !property_exists($this, 'target')) { |
39 | 39 | throw new PHPUnitFrameworkException(self::class . ': ' . static::class |
40 | - . ' must define the properties $target and $traits.'); |
|
40 | + . ' must define the properties $target and $traits.'); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | $this->assertUsesTraits($this->traits, $this->target); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public function testUsesTraits() |
37 | 37 | { |
38 | 38 | if (!property_exists($this, 'traits') || !property_exists($this, 'target')) { |
39 | - throw new PHPUnitFrameworkException(self::class . ': ' . static::class |
|
39 | + throw new PHPUnitFrameworkException(self::class.': '.static::class |
|
40 | 40 | . ' must define the properties $target and $traits.'); |
41 | 41 | } |
42 | 42 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | use Core\Service\Tracy; |
25 | 25 | use Laminas\I18n\Translator\Resources; |
26 | 26 | |
27 | -$doctrineConfig = include __DIR__ . '/doctrine.config.php'; |
|
27 | +$doctrineConfig = include __DIR__.'/doctrine.config.php'; |
|
28 | 28 | |
29 | 29 | |
30 | 30 | return array( |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ], |
77 | 77 | |
78 | 78 | 'options' => [ |
79 | - 'Core/MailServiceOptions' => [ 'class' => '\Core\Options\MailServiceOptions' ], |
|
79 | + 'Core/MailServiceOptions' => ['class' => '\Core\Options\MailServiceOptions'], |
|
80 | 80 | ], |
81 | 81 | |
82 | 82 | 'Core' => array( |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | 'name' => 'stream', |
140 | 140 | 'priority' => 1000, |
141 | 141 | 'options' => [ |
142 | - 'stream' => getcwd() . '/var/log/mailqueue.log', |
|
142 | + 'stream' => getcwd().'/var/log/mailqueue.log', |
|
143 | 143 | 'formatter' => [ |
144 | 144 | 'name' => 'simple', |
145 | 145 | 'options' => [ |
@@ -375,19 +375,19 @@ discard block |
||
375 | 375 | 'modules/Core/jsonEntityHydrator' => 'Core\Entity\Hydrator\JsonEntityHydratorFactory', |
376 | 376 | 'Core/EntityHydrator' => 'Core\Entity\Hydrator\EntityHydratorFactory', |
377 | 377 | 'Core/Options' => 'Core\Factory\ModuleOptionsFactory', |
378 | - 'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class,'factory'], |
|
379 | - 'DefaultListeners' => ['Core\Listener\DefaultListener','factory'], |
|
380 | - 'templateProviderStrategy' => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy','factory'], |
|
381 | - 'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class,'factory'], |
|
378 | + 'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class, 'factory'], |
|
379 | + 'DefaultListeners' => ['Core\Listener\DefaultListener', 'factory'], |
|
380 | + 'templateProviderStrategy' => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy', 'factory'], |
|
381 | + 'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class, 'factory'], |
|
382 | 382 | 'Core/Listener/CreatePaginator' => 'Core\Listener\CreatePaginatorListener::factory', |
383 | 383 | 'Core/Locale' => 'Core\I18n\LocaleFactory', |
384 | 384 | \Core\Listener\AjaxRouteListener::class => \Core\Factory\Listener\AjaxRouteListenerFactory::class, |
385 | 385 | \Core\Listener\DeleteImageSetListener::class => \Core\Factory\Listener\DeleteImageSetListenerFactory::class, |
386 | 386 | 'Imagine' => \Core\Factory\Service\ImagineFactory::class, |
387 | - 'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class,'factory'], |
|
388 | - 'Tracy' => [Tracy::class,'factory'], |
|
387 | + 'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class, 'factory'], |
|
388 | + 'Tracy' => [Tracy::class, 'factory'], |
|
389 | 389 | Service\EntityEraser\DefaultEntityLoaderListener::class => Service\EntityEraser\DefaultEntityLoaderListenerFactory::class, |
390 | - ClearCacheService::class => [ClearCacheService::class,'factory'], |
|
390 | + ClearCacheService::class => [ClearCacheService::class, 'factory'], |
|
391 | 391 | Listener\ModuleVersionAdminWidgetProvider::class => Listener\ModuleVersionAdminWidgetProviderFactory::class, |
392 | 392 | Queue\Worker\MongoWorker::class => \SlmQueue\Factory\WorkerFactory::class, |
393 | 393 | 'Core/HtmlPurifier' => \Core\Factory\Service\HtmlPurifierFactory::class, |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | 'translation_file_patterns' => array( |
416 | 416 | [ |
417 | 417 | 'type' => 'gettext', |
418 | - 'base_dir' => __DIR__ . '/../language', |
|
418 | + 'base_dir' => __DIR__.'/../language', |
|
419 | 419 | 'pattern' => '%s.mo', |
420 | 420 | ], |
421 | 421 | [ |
@@ -460,8 +460,8 @@ discard block |
||
460 | 460 | 'Core/File' => FileControllerFactory::class, |
461 | 461 | 'Core/Content' => LazyControllerFactory::class, |
462 | 462 | Controller\Console\PurgeController::class => Controller\Console\PurgeControllerFactory::class, |
463 | - AssetsInstallController::class => [AssetsInstallController::class,'factory'], |
|
464 | - ClearCacheController::class => [ClearCacheController::class,'factory'], |
|
463 | + AssetsInstallController::class => [AssetsInstallController::class, 'factory'], |
|
464 | + ClearCacheController::class => [ClearCacheController::class, 'factory'], |
|
465 | 465 | Queue\Controller\MongoQueueController::class => Queue\Controller\MongoQueueControllerFactory::class, |
466 | 466 | Queue\Controller\MongoQueueListController::class => Queue\Controller\MongoQueueListControllerFactory::class, |
467 | 467 | |
@@ -476,9 +476,9 @@ discard block |
||
476 | 476 | 'Core/SearchForm' => 'Core\Factory\Controller\Plugin\SearchFormFactory', |
477 | 477 | 'listquery' => 'Core\Controller\Plugin\ListQuery::factory', |
478 | 478 | 'mail' => 'Core\Controller\Plugin\Mail::factory', |
479 | - 'Core/Mailer' => ['Core\Controller\Plugin\Mailer','factory'], |
|
480 | - 'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class,'factory'], |
|
481 | - 'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class,'factory'], |
|
479 | + 'Core/Mailer' => ['Core\Controller\Plugin\Mailer', 'factory'], |
|
480 | + 'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class, 'factory'], |
|
481 | + 'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class, 'factory'], |
|
482 | 482 | Controller\Plugin\EntityEraser::class => Controller\Plugin\EntityEraserFactory::class, |
483 | 483 | ), |
484 | 484 | 'invokables' => array( |
@@ -509,32 +509,32 @@ discard block |
||
509 | 509 | 'exception_template' => 'error/index', |
510 | 510 | // Map template to files. Speeds up the lookup through the template stack. |
511 | 511 | 'template_map' => array( |
512 | - 'noscript-notice' => __DIR__ . '/../view/layout/_noscript-notice.phtml', |
|
513 | - 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml', |
|
514 | - 'error/404' => __DIR__ . '/../view/error/404.phtml', |
|
515 | - 'error/403' => __DIR__ . '/../view/error/403.phtml', |
|
516 | - 'error/index' => __DIR__ . '/../view/error/index.phtml', |
|
517 | - 'main-navigation' => __DIR__ . '/../view/partial/main-navigation.phtml', |
|
518 | - 'pagination-control' => __DIR__ . '/../view/partial/pagination-control.phtml', |
|
519 | - 'core/loading-popup' => __DIR__ . '/../view/partial/loading-popup.phtml', |
|
520 | - 'core/notifications' => __DIR__ . '/../view/partial/notifications.phtml', |
|
521 | - 'form/core/buttons' => __DIR__ . '/../view/form/buttons.phtml', |
|
522 | - 'core/social-buttons' => __DIR__ . '/../view/partial/social-buttons.phtml', |
|
523 | - 'form/core/privacy' => __DIR__ . '/../view/form/privacy.phtml', |
|
524 | - 'core/form/permissions-fieldset' => __DIR__ . '/../view/form/permissions-fieldset.phtml', |
|
525 | - 'core/form/permissions-collection' => __DIR__ . '/../view/form/permissions-collection.phtml', |
|
526 | - 'core/form/container-view' => __DIR__ . '/../view/form/container.view.phtml', |
|
527 | - 'core/form/tree-manage.view' => __DIR__ . '/../view/form/tree-manage.view.phtml', |
|
528 | - 'core/form/tree-manage.form' => __DIR__ . '/../view/form/tree-manage.form.phtml', |
|
529 | - 'core/form/tree-add-item' => __DIR__ . '/../view/form/tree-add-item.phtml', |
|
530 | - 'mail/header' => __DIR__ . '/../view/mail/header.phtml', |
|
531 | - 'mail/footer' => __DIR__ . '/../view/mail/footer.phtml', |
|
532 | - 'mail/footer.en' => __DIR__ . '/../view/mail/footer.en.phtml', |
|
512 | + 'noscript-notice' => __DIR__.'/../view/layout/_noscript-notice.phtml', |
|
513 | + 'layout/layout' => __DIR__.'/../view/layout/layout.phtml', |
|
514 | + 'error/404' => __DIR__.'/../view/error/404.phtml', |
|
515 | + 'error/403' => __DIR__.'/../view/error/403.phtml', |
|
516 | + 'error/index' => __DIR__.'/../view/error/index.phtml', |
|
517 | + 'main-navigation' => __DIR__.'/../view/partial/main-navigation.phtml', |
|
518 | + 'pagination-control' => __DIR__.'/../view/partial/pagination-control.phtml', |
|
519 | + 'core/loading-popup' => __DIR__.'/../view/partial/loading-popup.phtml', |
|
520 | + 'core/notifications' => __DIR__.'/../view/partial/notifications.phtml', |
|
521 | + 'form/core/buttons' => __DIR__.'/../view/form/buttons.phtml', |
|
522 | + 'core/social-buttons' => __DIR__.'/../view/partial/social-buttons.phtml', |
|
523 | + 'form/core/privacy' => __DIR__.'/../view/form/privacy.phtml', |
|
524 | + 'core/form/permissions-fieldset' => __DIR__.'/../view/form/permissions-fieldset.phtml', |
|
525 | + 'core/form/permissions-collection' => __DIR__.'/../view/form/permissions-collection.phtml', |
|
526 | + 'core/form/container-view' => __DIR__.'/../view/form/container.view.phtml', |
|
527 | + 'core/form/tree-manage.view' => __DIR__.'/../view/form/tree-manage.view.phtml', |
|
528 | + 'core/form/tree-manage.form' => __DIR__.'/../view/form/tree-manage.form.phtml', |
|
529 | + 'core/form/tree-add-item' => __DIR__.'/../view/form/tree-add-item.phtml', |
|
530 | + 'mail/header' => __DIR__.'/../view/mail/header.phtml', |
|
531 | + 'mail/footer' => __DIR__.'/../view/mail/footer.phtml', |
|
532 | + 'mail/footer.en' => __DIR__.'/../view/mail/footer.en.phtml', |
|
533 | 533 | //'startpage' => __DIR__ . '/../view/layout/startpage.phtml', |
534 | 534 | ), |
535 | 535 | // Where to look for view templates not mapped above |
536 | 536 | 'template_path_stack' => array( |
537 | - __DIR__ . '/../view', |
|
537 | + __DIR__.'/../view', |
|
538 | 538 | ), |
539 | 539 | ), |
540 | 540 | 'view_helpers' => array( |
@@ -46,7 +46,7 @@ |
||
46 | 46 | $original = $imagine->open($tmpFile); |
47 | 47 | $images['original'] = $original; |
48 | 48 | |
49 | - foreach($specs as $key => $size){ |
|
49 | + foreach ($specs as $key => $size) { |
|
50 | 50 | $newImage = ImageSetInterface::THUMBNAIL == $key |
51 | 51 | ? $original->thumbnail(new Box($size[0], $size[1]), ImagineImage::THUMBNAIL_INSET) |
52 | 52 | : $this->createImage($original, $size); |