@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | $container->expects($this->any()) |
57 | 57 | ->method('get') |
58 | 58 | ->willReturnMap([ |
59 | - ['config',$config], |
|
60 | - ['ModuleManager',$moduleManager], |
|
61 | - ['repositories',$repositories], |
|
62 | - ['Core/EventManager',$eventManager] |
|
59 | + ['config', $config], |
|
60 | + ['ModuleManager', $moduleManager], |
|
61 | + ['repositories', $repositories], |
|
62 | + ['Core/EventManager', $eventManager] |
|
63 | 63 | ]) |
64 | 64 | ; |
65 | 65 | |
@@ -73,9 +73,9 @@ discard block |
||
73 | 73 | public function invokeTestProvider() |
74 | 74 | { |
75 | 75 | return [ |
76 | - ['Core/Index',IndexController::class], |
|
77 | - ['Core/File',FileController::class], |
|
78 | - ['Core/Content',ContentController::class], |
|
76 | + ['Core/Index', IndexController::class], |
|
77 | + ['Core/File', FileController::class], |
|
78 | + ['Core/Content', ContentController::class], |
|
79 | 79 | ]; |
80 | 80 | } |
81 | 81 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | '@testCreateService' => ['mock' => ['__invoke' => ['@with' => 'getCreateServiceInvokationArgs', 'count' => 1]]], |
40 | 40 | ]; |
41 | 41 | |
42 | - private $inheritance = [ FactoryInterface::class ]; |
|
42 | + private $inheritance = [FactoryInterface::class]; |
|
43 | 43 | |
44 | 44 | private function getCreateServiceInvokationArgs() |
45 | 45 | { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | '@testCreateService' => ['mock' => ['__invoke' => ['@with' => 'getInvokationMockArgs', 'count' => 1]]], |
42 | 42 | ]; |
43 | 43 | |
44 | - private $inheritance = [ FactoryInterface::class ]; |
|
44 | + private $inheritance = [FactoryInterface::class]; |
|
45 | 45 | |
46 | 46 | private function getInvokationMockArgs() |
47 | 47 | { |
@@ -88,6 +88,6 @@ discard block |
||
88 | 88 | } |
89 | 89 | } |
90 | 90 | |
91 | - $this->fail('Imagine instance creation for ' .$lib . ' failed.'); |
|
91 | + $this->fail('Imagine instance creation for '.$lib.' failed.'); |
|
92 | 92 | } |
93 | 93 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | ], |
52 | 52 | ]; |
53 | 53 | |
54 | - private $inheritance = [ FactoryInterface::class]; |
|
54 | + private $inheritance = [FactoryInterface::class]; |
|
55 | 55 | |
56 | 56 | public function testSetCreationOptions() |
57 | 57 | { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $services = new ServiceManager(); |
70 | 70 | $forms = new FormElementManagerV3Polyfill($services); |
71 | 71 | |
72 | - $options = [ 'test' => 'work?' ]; |
|
72 | + $options = ['test' => 'work?']; |
|
73 | 73 | $this->target->setCreationOptions($options); |
74 | 74 | |
75 | 75 | $this->target |
@@ -86,11 +86,11 @@ discard block |
||
86 | 86 | public function provideMissingOptions() |
87 | 87 | { |
88 | 88 | return [ |
89 | - [ null ], |
|
90 | - [ [] ], |
|
91 | - [ ['tree' => ['value' => 'test']] ], |
|
92 | - [ ['tree' => ['entity' => 'test']] ], |
|
93 | - [ ['tree' => ['name' => 'test']] ], |
|
89 | + [null], |
|
90 | + [[]], |
|
91 | + [['tree' => ['value' => 'test']]], |
|
92 | + [['tree' => ['entity' => 'test']]], |
|
93 | + [['tree' => ['name' => 'test']]], |
|
94 | 94 | ]; |
95 | 95 | } |
96 | 96 | |
@@ -122,10 +122,10 @@ discard block |
||
122 | 122 | $this->expectException(\RuntimeException::class); |
123 | 123 | $this->expectExceptionMessage('Tree root not found'); |
124 | 124 | |
125 | - $this->target->__invoke($services, '', ['tree' => [ 'entity' => 'testEntityRepository', 'value' => 'test']]); |
|
125 | + $this->target->__invoke($services, '', ['tree' => ['entity' => 'testEntityRepository', 'value' => 'test']]); |
|
126 | 126 | } |
127 | 127 | |
128 | - private function getServiceContainer($criteria, $root=null) |
|
128 | + private function getServiceContainer($criteria, $root = null) |
|
129 | 129 | { |
130 | 130 | if (null === $root) { |
131 | 131 | $root = new Node('Test'); |
@@ -188,9 +188,9 @@ discard block |
||
188 | 188 | $root3 = $this->createRoot('root', ['child1' => ['gChild11', 'gChild12']]); |
189 | 189 | |
190 | 190 | return [ |
191 | - [ $root1, [], ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]], |
|
192 | - [ $root2, ['use_root_item' => true], ['root' => ['label' => 'root', 'options' => ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]]]], |
|
193 | - [ $root3, ['allow_select_nodes' => true], ['child1-group' => ['label' => 'child1', 'options' => ['child1' => 'child1', 'child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]] ] |
|
191 | + [$root1, [], ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]], |
|
192 | + [$root2, ['use_root_item' => true], ['root' => ['label' => 'root', 'options' => ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]]]], |
|
193 | + [$root3, ['allow_select_nodes' => true], ['child1-group' => ['label' => 'child1', 'options' => ['child1' => 'child1', 'child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]] |
|
194 | 194 | ]; |
195 | 195 | } |
196 | 196 |
@@ -47,16 +47,16 @@ discard block |
||
47 | 47 | $services = new ServiceManager(); |
48 | 48 | $this->assertTrue( |
49 | 49 | $this->target->canCreate( |
50 | - $services, |
|
51 | - 'Any.string/Value/Events' |
|
52 | - ), |
|
50 | + $services, |
|
51 | + 'Any.string/Value/Events' |
|
52 | + ), |
|
53 | 53 | 'Checking correct name failed.' |
54 | 54 | ); |
55 | 55 | $this->assertFalse( |
56 | 56 | $this->target->canCreate( |
57 | - $services, |
|
58 | - 'Any.string.not.ending/in/Events.but has it in the middle!' |
|
59 | - ), |
|
57 | + $services, |
|
58 | + 'Any.string.not.ending/in/Events.but has it in the middle!' |
|
59 | + ), |
|
60 | 60 | 'Checking invalid name failed.' |
61 | 61 | ); |
62 | 62 | } |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | |
99 | 99 | /* @var EventManagerAbstractFactory|\PHPUnit_Framework_MockObject_MockObject $target */ |
100 | 100 | $target = $this->getMockBuilder('\Core\Factory\EventManager\EventManagerAbstractFactory') |
101 | - ->setMethods([ 'createEventManager', 'attachListeners' ]) |
|
102 | - ->getMock(); |
|
101 | + ->setMethods([ 'createEventManager', 'attachListeners' ]) |
|
102 | + ->getMock(); |
|
103 | 103 | |
104 | 104 | $services = new ServiceManager(); |
105 | 105 | $services->setService('Config', $config); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | '@testCanCreateServiceWithName' => ['mock' => ['canCreate' => 1]], |
41 | 41 | ]; |
42 | 42 | |
43 | - protected $inheritance = [ '\Laminas\ServiceManager\Factory\AbstractFactoryInterface' ]; |
|
43 | + protected $inheritance = ['\Laminas\ServiceManager\Factory\AbstractFactoryInterface']; |
|
44 | 44 | |
45 | 45 | public function testDeterminesIfItCanCreateAnEventManagerByName() |
46 | 46 | { |
@@ -66,17 +66,17 @@ discard block |
||
66 | 66 | $config1 = []; |
67 | 67 | |
68 | 68 | $config2 = [ |
69 | - 'event_manager' => [ 'Test2/Events' => [ |
|
69 | + 'event_manager' => ['Test2/Events' => [ |
|
70 | 70 | 'service' => 'TestService', |
71 | 71 | 'configure' => false, |
72 | - 'identifiers' => [ 'TestEvents', 'AnotherId' ], |
|
72 | + 'identifiers' => ['TestEvents', 'AnotherId'], |
|
73 | 73 | 'event' => 'SomeEventClass', |
74 | - 'listeners' => [ 'listener' => 'event' ] |
|
74 | + 'listeners' => ['listener' => 'event'] |
|
75 | 75 | ]] |
76 | 76 | ]; |
77 | 77 | return [ |
78 | - [ $config1, 'Test1/Events' ], |
|
79 | - [ $config2, 'Test2/Events' ], |
|
78 | + [$config1, 'Test1/Events'], |
|
79 | + [$config2, 'Test2/Events'], |
|
80 | 80 | ]; |
81 | 81 | } |
82 | 82 | |
@@ -91,14 +91,14 @@ discard block |
||
91 | 91 | $defaults = [ |
92 | 92 | 'service' => 'EventManager', |
93 | 93 | 'configure' => true, |
94 | - 'identifiers' => [ $reqName ], |
|
94 | + 'identifiers' => [$reqName], |
|
95 | 95 | 'event' => '\Laminas\EventManager\Event', |
96 | 96 | 'listeners' => [], |
97 | 97 | ]; |
98 | 98 | |
99 | 99 | /* @var EventManagerAbstractFactory|\PHPUnit_Framework_MockObject_MockObject $target */ |
100 | 100 | $target = $this->getMockBuilder('\Core\Factory\EventManager\EventManagerAbstractFactory') |
101 | - ->setMethods([ 'createEventManager', 'attachListeners' ]) |
|
101 | + ->setMethods(['createEventManager', 'attachListeners']) |
|
102 | 102 | ->getMock(); |
103 | 103 | |
104 | 104 | $services = new ServiceManager(); |
@@ -44,7 +44,7 @@ |
||
44 | 44 | '@testCreateService' => ['mock' => ['__invoke']], |
45 | 45 | ]; |
46 | 46 | |
47 | - private $inheritance = [ FactoryInterface::class ]; |
|
47 | + private $inheritance = [FactoryInterface::class]; |
|
48 | 48 | |
49 | 49 | |
50 | 50 | public function testCreateService() |
@@ -32,12 +32,12 @@ |
||
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', ['default' => Image::class, '@value' => Image::class]], |
39 | 39 | ['formElementName', ['default' => ImageSetInterface::ORIGINAL, 'value' => 'formElementNameValue']], |
40 | - ['images', ['default'=>[ImageSetInterface::THUMBNAIL => [100,100]], 'value' => ['a' => [1,1]]]], |
|
40 | + ['images', ['default'=>[ImageSetInterface::THUMBNAIL => [100, 100]], 'value' => ['a' => [1, 1]]]], |
|
41 | 41 | ['entity', ['ignore_setter' => true, 'value@' => Image::class]], |
42 | 42 | ]; |
43 | 43 | } |
@@ -66,7 +66,7 @@ |
||
66 | 66 | 'stringtemplate' => '\Core\Mail\StringTemplateMessage', |
67 | 67 | ); |
68 | 68 | $factories = array( |
69 | - 'htmltemplate' => [HTMLTemplateMessage::class,'factory'] |
|
69 | + 'htmltemplate' => [HTMLTemplateMessage::class, 'factory'] |
|
70 | 70 | ); |
71 | 71 | |
72 | 72 | $this->assertAttributeEquals(false, 'shareByDefault', $target, 'shareByDefault is not set to FALSE'); |
@@ -84,12 +84,12 @@ |
||
84 | 84 | )); |
85 | 85 | |
86 | 86 | $translator = $this->getMockBuilder('\Laminas\I18n\Translator\Translator') |
87 | - ->disableOriginalConstructor() |
|
88 | - ->getMock(); |
|
87 | + ->disableOriginalConstructor() |
|
88 | + ->getMock(); |
|
89 | 89 | |
90 | 90 | $services = $this->getMockBuilder('\Laminas\ServiceManager\ServiceManager') |
91 | - ->disableOriginalConstructor() |
|
92 | - ->getMock(); |
|
91 | + ->disableOriginalConstructor() |
|
92 | + ->getMock(); |
|
93 | 93 | |
94 | 94 | |
95 | 95 | $services |
@@ -67,11 +67,11 @@ discard block |
||
67 | 67 | $addressList = new AddressList(); |
68 | 68 | $addressValue = ArrayUtils::iteratorToArray($addressList); |
69 | 69 | return [ |
70 | - ['variables',[ |
|
70 | + ['variables', [ |
|
71 | 71 | 'value' => ['some' => 'value'], |
72 | 72 | 'default' => [], |
73 | 73 | ]], |
74 | - ['variables',[ |
|
74 | + ['variables', [ |
|
75 | 75 | 'value' => $this, |
76 | 76 | 'setter_exception' => [ |
77 | 77 | \InvalidArgumentException::class, |
@@ -79,30 +79,30 @@ discard block |
||
79 | 79 | ], |
80 | 80 | |
81 | 81 | ]], |
82 | - ['variables',[ |
|
82 | + ['variables', [ |
|
83 | 83 | 'value' => $addressList, |
84 | 84 | 'expect' => $addressValue |
85 | 85 | ]], |
86 | - ['template',[ |
|
86 | + ['template', [ |
|
87 | 87 | 'value' => 'some-template', |
88 | 88 | 'default' => null |
89 | 89 | ]], |
90 | - ['callbacks',[ |
|
90 | + ['callbacks', [ |
|
91 | 91 | 'value' => [ |
92 | - 'some' => [$this,'someCallback'] |
|
92 | + 'some' => [$this, 'someCallback'] |
|
93 | 93 | ], |
94 | 94 | 'default' => array(), |
95 | 95 | ]], |
96 | - ['callbacks',[ |
|
96 | + ['callbacks', [ |
|
97 | 97 | 'value' => $this, |
98 | 98 | 'setter_exception' => [ |
99 | 99 | \InvalidArgumentException::class, |
100 | 100 | 'Expect an array or an instance of \Traversable, but received' |
101 | 101 | ] |
102 | 102 | ]], |
103 | - ['callbacks',[ |
|
103 | + ['callbacks', [ |
|
104 | 104 | 'value' => [ |
105 | - 'uncallable' => [$this,'notCallable'] |
|
105 | + 'uncallable' => [$this, 'notCallable'] |
|
106 | 106 | ], |
107 | 107 | 'setter_exception' => [ |
108 | 108 | \InvalidArgumentException::class, |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | public function testGetBodyText() |
116 | 116 | { |
117 | 117 | $translator = $this->createMock(TranslatorInterface::class); |
118 | - $target = new StringTemplateMessage(); |
|
118 | + $target = new StringTemplateMessage(); |
|
119 | 119 | $target->setTranslator($translator); |
120 | 120 | |
121 | 121 | $translator->expects($this->any()) |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | trim($target->getSubject()) |
156 | 156 | ); |
157 | 157 | |
158 | - $target->setCallback('callback', function () { |
|
158 | + $target->setCallback('callback', function() { |
|
159 | 159 | return 'Hello From Callback!'; |
160 | 160 | }); |
161 | 161 | $target->setCallback('object', 'getSubject'); |