@@ -30,7 +30,7 @@ |
||
30 | 30 | /* @var $serviceLocator \Laminas\View\HelperPluginManager */ |
31 | 31 | $options = $container->get('Auth/Options'); |
32 | 32 | $config = $container->get('Config'); |
33 | - $helper = new SocialButtons($options,$config); |
|
33 | + $helper = new SocialButtons($options, $config); |
|
34 | 34 | return $helper; |
35 | 35 | } |
36 | 36 | } |
@@ -4,10 +4,10 @@ discard block |
||
4 | 4 | |
5 | 5 | use PHPUnit\Framework\TestCase; |
6 | 6 | 'modules' => array_merge( |
7 | - include_once __DIR__.'/../../../config/common.modules.php', |
|
8 | - array( |
|
7 | + include_once __DIR__.'/../../../config/common.modules.php', |
|
8 | + array( |
|
9 | 9 | 'Core', 'Auth', 'Jobs', 'Applications', 'Organizations' |
10 | - ) |
|
10 | + ) |
|
11 | 11 | ), |
12 | 12 | |
13 | 13 | // These are various options for the listeners attached to the ModuleManager |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | // ), |
66 | 66 | // ) |
67 | 67 | |
68 | - // Initial configuration with which to seed the ServiceManager. |
|
69 | - // Should be compatible with Laminas\ServiceManager\Config. |
|
70 | - // 'service_manager' => array(), |
|
68 | + // Initial configuration with which to seed the ServiceManager. |
|
69 | + // Should be compatible with Laminas\ServiceManager\Config. |
|
70 | + // 'service_manager' => array(), |
|
71 | 71 | ); |
72 | 72 | \ No newline at end of file |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | protected $target = '\Core\EventManager\EventManager'; |
35 | 35 | |
36 | - protected $inheritance = [ '\Laminas\EventManager\EventManager', '\Core\EventManager\EventProviderInterface' ]; |
|
36 | + protected $inheritance = ['\Laminas\EventManager\EventManager', '\Core\EventManager\EventProviderInterface']; |
|
37 | 37 | |
38 | 38 | public function testSetEventPrototype() |
39 | 39 | { |
@@ -46,23 +46,23 @@ discard block |
||
46 | 46 | { |
47 | 47 | $testTarget = new \stdClass(); |
48 | 48 | $testTarget2 = new \stdClass(); |
49 | - $testParams1 = [ 'params1' => 'value1' ]; |
|
50 | - $testParams2 = [ 'name' => 'test6', 'param2' => 'value2' ]; |
|
51 | - $testParams3 = [ 'name' => 'test8', 'target' => $testTarget, 'param3' => 'value3' ]; |
|
52 | - $expect2 = [ 'param2' => 'value2' ]; |
|
53 | - $expect3 = [ 'param3' => 'value3' ]; |
|
49 | + $testParams1 = ['params1' => 'value1']; |
|
50 | + $testParams2 = ['name' => 'test6', 'param2' => 'value2']; |
|
51 | + $testParams3 = ['name' => 'test8', 'target' => $testTarget, 'param3' => 'value3']; |
|
52 | + $expect2 = ['param2' => 'value2']; |
|
53 | + $expect3 = ['param3' => 'value3']; |
|
54 | 54 | |
55 | 55 | return [ |
56 | - [ 'test1', null, [], [ 'name' => 'test1', 'target' => null, 'params' => []]], |
|
57 | - [ 'test2', $testTarget, [], [ 'name' => 'test2', 'target' => $testTarget, 'params' => []]], |
|
58 | - [ 'test3', null, $testParams1, [ 'name' => 'test3', 'target' => null, 'params' => $testParams1]], |
|
59 | - 'setParamsAsFirstArg' => [ $testParams1, null, ['ignoreme' => 'yes' ], [ 'name' => null, 'target' => null, 'params' => $testParams1 ]], |
|
60 | - 'setParamsAsSecondArg' => [ 'test5', $testParams1, ['ignoreme' => 'yes' ], ['name' => 'test5', 'target' => null, 'params' => $testParams1 ]], |
|
61 | - 'setNameInParamsAsFirstArg' => [ $testParams2, null, [], [ 'name' => 'test6', 'target' => null, 'params' => $expect2]], |
|
62 | - 'setNameInParamsAsFirstArgAndTarget' => [ $testParams2, $testTarget, ['ignoreme' => 'yes'], [ 'name' => 'test6', 'target' => $testTarget, 'params' => $expect2]], |
|
63 | - 'setNameAndTargetInParams' => [ $testParams3, null, [], [ 'name' => 'test8', 'target' => $testTarget, 'params' => $expect3]], |
|
64 | - [ 'test9', $testTarget2, $testParams3, ['name' => 'test9', 'target' => $testTarget2, 'params' => $testParams3 ]], |
|
65 | - [ null, $testParams2, [], ['name' => 'test6', 'target' => null, 'params' => $expect2 ]], |
|
56 | + ['test1', null, [], ['name' => 'test1', 'target' => null, 'params' => []]], |
|
57 | + ['test2', $testTarget, [], ['name' => 'test2', 'target' => $testTarget, 'params' => []]], |
|
58 | + ['test3', null, $testParams1, ['name' => 'test3', 'target' => null, 'params' => $testParams1]], |
|
59 | + 'setParamsAsFirstArg' => [$testParams1, null, ['ignoreme' => 'yes'], ['name' => null, 'target' => null, 'params' => $testParams1]], |
|
60 | + 'setParamsAsSecondArg' => ['test5', $testParams1, ['ignoreme' => 'yes'], ['name' => 'test5', 'target' => null, 'params' => $testParams1]], |
|
61 | + 'setNameInParamsAsFirstArg' => [$testParams2, null, [], ['name' => 'test6', 'target' => null, 'params' => $expect2]], |
|
62 | + 'setNameInParamsAsFirstArgAndTarget' => [$testParams2, $testTarget, ['ignoreme' => 'yes'], ['name' => 'test6', 'target' => $testTarget, 'params' => $expect2]], |
|
63 | + 'setNameAndTargetInParams' => [$testParams3, null, [], ['name' => 'test8', 'target' => $testTarget, 'params' => $expect3]], |
|
64 | + ['test9', $testTarget2, $testParams3, ['name' => 'test9', 'target' => $testTarget2, 'params' => $testParams3]], |
|
65 | + [null, $testParams2, [], ['name' => 'test6', 'target' => null, 'params' => $expect2]], |
|
66 | 66 | |
67 | 67 | ]; |
68 | 68 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | '@testFactoryMethodReturnsInstance' => false |
42 | 42 | ]; |
43 | 43 | |
44 | - protected $inheritance = [ '\Laminas\EventManager\ListenerAggregateInterface' ]; |
|
44 | + protected $inheritance = ['\Laminas\EventManager\ListenerAggregateInterface']; |
|
45 | 45 | |
46 | 46 | protected $services; |
47 | 47 | |
@@ -56,39 +56,39 @@ discard block |
||
56 | 56 | public function propertiesProvider() |
57 | 57 | { |
58 | 58 | return [ |
59 | - [ 'listeners', [ |
|
60 | - 'value' => [ [] ], |
|
61 | - 'setter_exception' => [ '\DomainException', 'Listener specification must be an array' ] |
|
59 | + ['listeners', [ |
|
60 | + 'value' => [[]], |
|
61 | + 'setter_exception' => ['\DomainException', 'Listener specification must be an array'] |
|
62 | 62 | ]], |
63 | - [ 'listeners', [ |
|
64 | - 'value' => [ [ 'event' => 'test' ] ], |
|
65 | - 'setter_exception' => [ '\DomainException', 'Listener specification must be an array' ] |
|
63 | + ['listeners', [ |
|
64 | + 'value' => [['event' => 'test']], |
|
65 | + 'setter_exception' => ['\DomainException', 'Listener specification must be an array'] |
|
66 | 66 | ]], |
67 | - [ 'listeners', [ |
|
68 | - 'value' => [ [ 'service' => 'test' ] ], |
|
69 | - 'setter_exception' => [ '\DomainException', 'Listener specification must be an array' ] |
|
67 | + ['listeners', [ |
|
68 | + 'value' => [['service' => 'test']], |
|
69 | + 'setter_exception' => ['\DomainException', 'Listener specification must be an array'] |
|
70 | 70 | ]], |
71 | - [ 'listeners', [ |
|
72 | - 'value' => [ [ 'event' => 'test', 'service' => 'service' ] ], |
|
71 | + ['listeners', [ |
|
72 | + 'value' => [['event' => 'test', 'service' => 'service']], |
|
73 | 73 | 'ignore_getter' => true, |
74 | - 'post' => ['assertListenerSpecsProperty', [ '', '@target', '###' ] ], |
|
74 | + 'post' => ['assertListenerSpecsProperty', ['', '@target', '###']], |
|
75 | 75 | ]], |
76 | - [ 'listeners', [ |
|
77 | - 'value' => [ [ 'event' => 'test2', 'service' => 'someClass', 'method' => 'method', 'priority' => 12 ] ], |
|
76 | + ['listeners', [ |
|
77 | + 'value' => [['event' => 'test2', 'service' => 'someClass', 'method' => 'method', 'priority' => 12]], |
|
78 | 78 | 'ignore_getter' => true, |
79 | - 'post' => ['assertListenerSpecsProperty', [ '', '@target', '###' ] ], |
|
79 | + 'post' => ['assertListenerSpecsProperty', ['', '@target', '###']], |
|
80 | 80 | ]], |
81 | - [ 'listener', [ |
|
81 | + ['listener', [ |
|
82 | 82 | 'value' => 'test', |
83 | - 'setter_args' => [ 'service', 'method', 10 ], |
|
84 | - 'setter_value' => [ 'event' => 'test', 'service' => 'service', 'method' => 'method', 'priority' => 10, 'instance' => null ], |
|
83 | + 'setter_args' => ['service', 'method', 10], |
|
84 | + 'setter_value' => ['event' => 'test', 'service' => 'service', 'method' => 'method', 'priority' => 10, 'instance' => null], |
|
85 | 85 | 'setter_assert' => 'assertListenerSpecsProperty', |
86 | 86 | 'ignore_getter' => true, |
87 | 87 | ]], |
88 | - [ 'listener', [ |
|
88 | + ['listener', [ |
|
89 | 89 | 'value' => 'test', |
90 | - 'setter_args' => [ 'service', 10 ], |
|
91 | - 'setter_value' => [ 'event' => 'test', 'service' => 'service', 'method' => null, 'priority' => 10, 'instance' => null ], |
|
90 | + 'setter_args' => ['service', 10], |
|
91 | + 'setter_value' => ['event' => 'test', 'service' => 'service', 'method' => null, 'priority' => 10, 'instance' => null], |
|
92 | 92 | 'setter_assert' => 'assertListenerSpecsProperty', |
93 | 93 | 'ignore_getter' => true, |
94 | 94 | ]] |
@@ -132,20 +132,20 @@ discard block |
||
132 | 132 | $this->target->setListener('test02', 'service02', 10); |
133 | 133 | |
134 | 134 | //In ZF3 EventManager detach should be a callable or it will throws an error |
135 | - $callback = [$testListener,'callback']; |
|
135 | + $callback = [$testListener, 'callback']; |
|
136 | 136 | $events = $this->getMockBuilder(EventManager::class) |
137 | 137 | ->setMethods(['attach', 'detach']) |
138 | 138 | ->getMock(); |
139 | 139 | $events->expects($this->exactly(2)) |
140 | 140 | ->method('attach') |
141 | 141 | ->withConsecutive( |
142 | - [ $this->equalTo('test01'), $this->anything(), $this->equalTo(0) ], |
|
143 | - [ $this->equalTo('test02'), $this->anything(), $this->equalTo(10) ] |
|
142 | + [$this->equalTo('test01'), $this->anything(), $this->equalTo(0)], |
|
143 | + [$this->equalTo('test02'), $this->anything(), $this->equalTo(10)] |
|
144 | 144 | ) |
145 | 145 | ->will( |
146 | 146 | $this->onConsecutiveCalls( |
147 | - [$testListener,'callback'], |
|
148 | - [$testListener,'callback'] |
|
147 | + [$testListener, 'callback'], |
|
148 | + [$testListener, 'callback'] |
|
149 | 149 | ) |
150 | 150 | ); |
151 | 151 | |
@@ -186,13 +186,13 @@ discard block |
||
186 | 186 | public function listenerProvider() |
187 | 187 | { |
188 | 188 | return [ |
189 | - [ 'nonExistant', null ], |
|
190 | - [ '\CoreTest\Listener\DLATListenerMock', null ], |
|
191 | - [ 'listener', new DLATListenerMock() ], |
|
192 | - [ 'listener', new DLATListenerMock(), 'invoke' ], |
|
193 | - [ 'listener', new DLATListenerMock(), 'method', 'callback' ], |
|
194 | - [ 'listener', new DLATListenerMock(), 'methodButNone', 'noMethod' ], |
|
195 | - [ 'listener', new DLATNonInvokableListenerMock() ], |
|
189 | + ['nonExistant', null], |
|
190 | + ['\CoreTest\Listener\DLATListenerMock', null], |
|
191 | + ['listener', new DLATListenerMock()], |
|
192 | + ['listener', new DLATListenerMock(), 'invoke'], |
|
193 | + ['listener', new DLATListenerMock(), 'method', 'callback'], |
|
194 | + ['listener', new DLATListenerMock(), 'methodButNone', 'noMethod'], |
|
195 | + ['listener', new DLATNonInvokableListenerMock()], |
|
196 | 196 | ]; |
197 | 197 | } |
198 | 198 | |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | if (null === $listener) { |
212 | 212 | if (!class_exists($service, true)) { |
213 | 213 | $this->expectException('\UnexpectedValueException'); |
214 | - $this->expectExceptionMessage('Cannot create deferred listener "' . $service); |
|
214 | + $this->expectExceptionMessage('Cannot create deferred listener "'.$service); |
|
215 | 215 | } |
216 | 216 | $this->services->expects($this->once())->method('has')->with($service)->willReturn(false); |
217 | 217 | $this->services->expects($this->never())->method('get'); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | ], |
48 | 48 | ]; |
49 | 49 | |
50 | - protected $inheritance = [ '\Laminas\Mvc\Controller\Plugin\AbstractPlugin' ]; |
|
50 | + protected $inheritance = ['\Laminas\Mvc\Controller\Plugin\AbstractPlugin']; |
|
51 | 51 | |
52 | 52 | public function testInvokationWithoutArgumentsReturnsSelf() |
53 | 53 | { |
@@ -93,16 +93,16 @@ discard block |
||
93 | 93 | public function argumentsStackProvider() |
94 | 94 | { |
95 | 95 | return [ |
96 | - [ 'paginator', ['paginator'], ['as' => 'paginator', 'paginator', []] ], |
|
97 | - [ 'paginator', ['name', 'alias'], ['as' => 'alias', 'name', []] ], |
|
98 | - [ 'paginator', ['name', ['param' => 'value'], 'alias'], ['as' => 'alias', 'name', ['param' => 'value']] ], |
|
99 | - [ 'paginator', ['name', []], ['as' => 'paginator', 'name', []]], |
|
100 | - [ 'form', ['formName'], ['as' => 'searchform', 'formName', null]], |
|
101 | - [ 'form', ['formName', ['testOpt' => 'testVal']], ['as' => 'searchform', 'formName', ['testOpt' => 'testVal']]], |
|
102 | - [ 'form', ['formName', null, 'alias'], ['as' => 'alias', 'formName', null]], |
|
103 | - [ 'form', ['formName', 'alias'], ['as' => 'alias', 'formName', null]], |
|
104 | - [ 'params', ['namespace'], ['namespace', ['page' => 1]]], |
|
105 | - [ 'params', ['namespace', ['param' => 'value']], ['namespace', ['param' => 'value']]], |
|
96 | + ['paginator', ['paginator'], ['as' => 'paginator', 'paginator', []]], |
|
97 | + ['paginator', ['name', 'alias'], ['as' => 'alias', 'name', []]], |
|
98 | + ['paginator', ['name', ['param' => 'value'], 'alias'], ['as' => 'alias', 'name', ['param' => 'value']]], |
|
99 | + ['paginator', ['name', []], ['as' => 'paginator', 'name', []]], |
|
100 | + ['form', ['formName'], ['as' => 'searchform', 'formName', null]], |
|
101 | + ['form', ['formName', ['testOpt' => 'testVal']], ['as' => 'searchform', 'formName', ['testOpt' => 'testVal']]], |
|
102 | + ['form', ['formName', null, 'alias'], ['as' => 'alias', 'formName', null]], |
|
103 | + ['form', ['formName', 'alias'], ['as' => 'alias', 'formName', null]], |
|
104 | + ['params', ['namespace'], ['namespace', ['page' => 1]]], |
|
105 | + ['params', ['namespace', ['param' => 'value']], ['namespace', ['param' => 'value']]], |
|
106 | 106 | ]; |
107 | 107 | } |
108 | 108 | |
@@ -126,14 +126,14 @@ discard block |
||
126 | 126 | { |
127 | 127 | $this->target->expects($this->exactly(2))->method('paginator') |
128 | 128 | ->withConsecutive( |
129 | - [ 'Name' ], |
|
130 | - [ 'Name', 'Alias'] |
|
129 | + ['Name'], |
|
130 | + ['Name', 'Alias'] |
|
131 | 131 | )->willReturn($this->returnSelf()); |
132 | 132 | |
133 | 133 | $this->target->expects($this->exactly(2))->method('form') |
134 | 134 | ->withConsecutive( |
135 | - [ 'Name' ], |
|
136 | - [ 'Name', 'Alias'] |
|
135 | + ['Name'], |
|
136 | + ['Name', 'Alias'] |
|
137 | 137 | )->willReturn($this->returnSelf()); |
138 | 138 | |
139 | 139 | $stack = [ |
@@ -47,17 +47,17 @@ discard block |
||
47 | 47 | $this->pluginMock = $pluginMock; |
48 | 48 | |
49 | 49 | $controller = $this->getMockBuilder('\Laminas\Mvc\Controller\AbstractController') |
50 | - ->setMethods(['getRequest', 'plugin']) |
|
51 | - ->getMockForAbstractClass(); |
|
50 | + ->setMethods(['getRequest', 'plugin']) |
|
51 | + ->getMockForAbstractClass(); |
|
52 | 52 | |
53 | 53 | $controller->expects($this->any())->method('getRequest')->willReturn($this->request); |
54 | 54 | $controller->expects($this->any())->method('plugin')->will($this->returnValueMap( |
55 | 55 | [ |
56 | - ['paginator', null, $pluginMock], |
|
57 | - ['paginationParams', null, $pluginMock], |
|
58 | - ['searchform', null, $pluginMock], |
|
59 | - ] |
|
60 | - )); |
|
56 | + ['paginator', null, $pluginMock], |
|
57 | + ['paginationParams', null, $pluginMock], |
|
58 | + ['searchform', null, $pluginMock], |
|
59 | + ] |
|
60 | + )); |
|
61 | 61 | |
62 | 62 | $this->target->setController($controller); |
63 | 63 | } |
@@ -117,10 +117,10 @@ discard block |
||
117 | 117 | |
118 | 118 | $this->assertAttributeEquals( |
119 | 119 | new Parameters([ |
120 | - 'a' => 'test', 'b' => ['test1', 'test2'], |
|
121 | - 'c' => ['test1', 'test2'], |
|
122 | - 'd' => ['test1' => 1, 'test2' => 1] |
|
123 | - ]), |
|
120 | + 'a' => 'test', 'b' => ['test1', 'test2'], |
|
121 | + 'c' => ['test1', 'test2'], |
|
122 | + 'd' => ['test1' => 1, 'test2' => 1] |
|
123 | + ]), |
|
124 | 124 | 'parameters', |
125 | 125 | $this->target |
126 | 126 | ); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | protected $target = '\Core\Controller\AdminControllerEvent'; |
32 | 32 | |
33 | - protected $inheritance = [ '\Laminas\EventManager\Event' ]; |
|
33 | + protected $inheritance = ['\Laminas\EventManager\Event']; |
|
34 | 34 | |
35 | 35 | public function testCreatesModelPriorityListUponCreation() |
36 | 36 | { |
@@ -64,10 +64,10 @@ discard block |
||
64 | 64 | public function provideAddViewTemplateTestData() |
65 | 65 | { |
66 | 66 | return [ |
67 | - [ [ 'test', 'template' ], ['test', 'template', [], 0] ], |
|
68 | - [ [ 'test', 'template', [ 'var' => 'iable']], [ 'test', 'template', [ 'var' => 'iable'], 0] ], |
|
69 | - [ [ 'test', 'template', 10] , ['test', 'template', [], 10] ], |
|
70 | - [ [ 'test', 'template', [ 'var' => 'iable'], 10 ], [ 'test', 'template', [ 'var' => 'iable'], 10 ]], |
|
67 | + [['test', 'template'], ['test', 'template', [], 0]], |
|
68 | + [['test', 'template', ['var' => 'iable']], ['test', 'template', ['var' => 'iable'], 0]], |
|
69 | + [['test', 'template', 10], ['test', 'template', [], 10]], |
|
70 | + [['test', 'template', ['var' => 'iable'], 10], ['test', 'template', ['var' => 'iable'], 10]], |
|
71 | 71 | ]; |
72 | 72 | } |
73 | 73 | |
@@ -94,12 +94,12 @@ discard block |
||
94 | 94 | public function provideAddViewVariablesTestData() |
95 | 95 | { |
96 | 96 | return [ |
97 | - [ [ 'test' ] , ['test', ['name' => 'test'], 0] ], |
|
98 | - [ [ 'test', [ 'var' => 'iable'] ], [ 'test', [ 'name' => 'test', 'var' => 'iable'], 0 ] ], |
|
99 | - [ [ 'test', [ 'var' => 'iable'], 10], [ 'test', [ 'name' => 'test', 'var' => 'iable'], 10 ]], |
|
100 | - [ [ [ 'name' => 'other', 'var' => 'test' ], 10], ['other', ['name' => 'other', 'var' => 'test' ], 10] ], |
|
101 | - [ [ 'test', ['name' => 'other'] ], [ 'test', [ 'name' => 'other' ], 0] ], |
|
102 | - [ [ 'test', 10 ], ['test', ['name' => 'test'], 10]], |
|
97 | + [['test'], ['test', ['name' => 'test'], 0]], |
|
98 | + [['test', ['var' => 'iable']], ['test', ['name' => 'test', 'var' => 'iable'], 0]], |
|
99 | + [['test', ['var' => 'iable'], 10], ['test', ['name' => 'test', 'var' => 'iable'], 10]], |
|
100 | + [[['name' => 'other', 'var' => 'test'], 10], ['other', ['name' => 'other', 'var' => 'test'], 10]], |
|
101 | + [['test', ['name' => 'other']], ['test', ['name' => 'other'], 0]], |
|
102 | + [['test', 10], ['test', ['name' => 'test'], 10]], |
|
103 | 103 | ]; |
104 | 104 | } |
105 | 105 |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | protected function setUp(): void |
41 | 41 | { |
42 | 42 | $test = $this; |
43 | - $sendCallback = function ($value) use ($test) { |
|
43 | + $sendCallback = function($value) use ($test) { |
|
44 | 44 | return $value === $test->expectedMail; |
45 | 45 | }; |
46 | 46 | $transport = $this->getMockForAbstractClass('\Laminas\Mail\Transport\TransportInterface'); |
@@ -109,9 +109,9 @@ discard block |
||
109 | 109 | public function testOverrideRecipient() |
110 | 110 | { |
111 | 111 | $overrideEmail = 'overidden@email'; |
112 | - $ccEmail="cc@email"; |
|
113 | - $bccEmail="bcc@email"; |
|
114 | - $toEmail="to@email"; |
|
112 | + $ccEmail = "cc@email"; |
|
113 | + $bccEmail = "bcc@email"; |
|
114 | + $toEmail = "to@email"; |
|
115 | 115 | |
116 | 116 | $recipients = new AddressList(); |
117 | 117 | $recipients->add($overrideEmail); |
@@ -128,13 +128,13 @@ discard block |
||
128 | 128 | $this->target->send($mail); |
129 | 129 | |
130 | 130 | $headers = $mail->getHeaders(); |
131 | - $expectedTo = 'To: ' . $overrideEmail; |
|
131 | + $expectedTo = 'To: '.$overrideEmail; |
|
132 | 132 | $this->assertFalse($headers->has('cc')); |
133 | 133 | $this->assertFalse($headers->has('bcc')); |
134 | 134 | $this->assertTrue($headers->has('X-Original-Recipients')); |
135 | 135 | |
136 | 136 | $this->assertEquals($expectedTo, $headers->get('to')->toString()); |
137 | - $this->assertEquals('X-Original-Recipients: To: ' . $toEmail . '; Cc: ' . $ccEmail . '; Bcc: ' . $bccEmail, $headers->get('X-Original-Recipients')->toString()); |
|
137 | + $this->assertEquals('X-Original-Recipients: To: '.$toEmail.'; Cc: '.$ccEmail.'; Bcc: '.$bccEmail, $headers->get('X-Original-Recipients')->toString()); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | public function testSetsXMailerHeader() |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | ]; |
57 | 57 | |
58 | 58 | return [ |
59 | - [ [], 'testnameone', 'Test/Name.One', false ], |
|
60 | - [ $cfg1, 'testnametwo', 'Test.Name/Two', true ], |
|
61 | - [ $cfg1, 'othername', '', false ], |
|
62 | - [ $cfg1, 'nonexistant', 'Non.Existant', false ], |
|
59 | + [[], 'testnameone', 'Test/Name.One', false], |
|
60 | + [$cfg1, 'testnametwo', 'Test.Name/Two', true], |
|
61 | + [$cfg1, 'othername', '', false], |
|
62 | + [$cfg1, 'nonexistant', 'Non.Existant', false], |
|
63 | 63 | ]; |
64 | 64 | } |
65 | 65 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | $services = $this->getServiceLocatorMock($optionsConfig); |
81 | 81 | |
82 | - $method = "assert" . ($expected ? 'True' : 'False'); |
|
82 | + $method = "assert".($expected ? 'True' : 'False'); |
|
83 | 83 | $this->$method($target->canCreateServiceWithName($services, $name, $requestedName)); |
84 | 84 | } |
85 | 85 | |
@@ -91,10 +91,10 @@ discard block |
||
91 | 91 | ]; |
92 | 92 | |
93 | 93 | return [ |
94 | - [ [], 'Test/Name.One', false ], |
|
95 | - [ $cfg1, 'Test.Name/Two', true ], |
|
96 | - [ $cfg1, 'othername', true ], |
|
97 | - [ $cfg1, 'Non.Existant', false ], |
|
94 | + [[], 'Test/Name.One', false], |
|
95 | + [$cfg1, 'Test.Name/Two', true], |
|
96 | + [$cfg1, 'othername', true], |
|
97 | + [$cfg1, 'Non.Existant', false], |
|
98 | 98 | ]; |
99 | 99 | } |
100 | 100 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | |
144 | 144 | $services = $this->getServiceLocatorMock([ |
145 | 145 | 'TestOption' => [ |
146 | - 'class' => __NAMESPACE__ . '\SimpleOptionsMock', |
|
146 | + 'class' => __NAMESPACE__.'\SimpleOptionsMock', |
|
147 | 147 | 'mode' => 'invalid', |
148 | 148 | ] |
149 | 149 | ]); |
@@ -158,11 +158,11 @@ discard block |
||
158 | 158 | */ |
159 | 159 | public function testCreatesSimpleOptionsInstance() |
160 | 160 | { |
161 | - $optionsMockClass = __NAMESPACE__ . '\SimpleOptionsMock'; |
|
161 | + $optionsMockClass = __NAMESPACE__.'\SimpleOptionsMock'; |
|
162 | 162 | $cfg = [ |
163 | 163 | 'SimpleOptions' => [ |
164 | 164 | 'class' => $optionsMockClass, |
165 | - 'options' => [ 'one' => 'three' ] |
|
165 | + 'options' => ['one' => 'three'] |
|
166 | 166 | ] |
167 | 167 | ]; |
168 | 168 | |
@@ -203,8 +203,8 @@ discard block |
||
203 | 203 | */ |
204 | 204 | public function testCreateNestedOptionsInstance() |
205 | 205 | { |
206 | - $nestedOptionsMockClass = __NAMESPACE__ . '\NestedOptionsMock'; |
|
207 | - $simpleOptionsMockClass = __NAMESPACE__ . '\SimpleOptionsMock'; |
|
206 | + $nestedOptionsMockClass = __NAMESPACE__.'\NestedOptionsMock'; |
|
207 | + $simpleOptionsMockClass = __NAMESPACE__.'\SimpleOptionsMock'; |
|
208 | 208 | |
209 | 209 | $cfg = [ |
210 | 210 | 'NestedOptions' => [ |
@@ -212,9 +212,9 @@ discard block |
||
212 | 212 | 'mode' => OptionsAbstractFactory::MODE_NESTED, |
213 | 213 | 'options' => [ |
214 | 214 | 'skalar' => 'itsworking', |
215 | - 'array' => [ 'its' => 'working' ], |
|
216 | - 'opt1' => [ '__class__' => $simpleOptionsMockClass ], |
|
217 | - 'opt2' => [ '__class__' => $simpleOptionsMockClass, 'two' => 'four' ], |
|
215 | + 'array' => ['its' => 'working'], |
|
216 | + 'opt1' => ['__class__' => $simpleOptionsMockClass], |
|
217 | + 'opt2' => ['__class__' => $simpleOptionsMockClass, 'two' => 'four'], |
|
218 | 218 | ], |
219 | 219 | ], |
220 | 220 | ]; |
@@ -228,14 +228,14 @@ discard block |
||
228 | 228 | |
229 | 229 | $this->assertInstanceOf($nestedOptionsMockClass, $options); |
230 | 230 | $this->assertEquals('itsworking', $options->getSkalar()); |
231 | - $this->assertEquals([ 'its' => 'working' ], $options->getArray()); |
|
231 | + $this->assertEquals(['its' => 'working'], $options->getArray()); |
|
232 | 232 | $this->assertEquals('One', $options->getOpt1()->getOne()); |
233 | 233 | $this->assertEquals('four', $options->getOpt2()->getTwo()); |
234 | 234 | } |
235 | 235 | |
236 | 236 | protected function getServiceLocatorMock($optionsConfig = []) |
237 | 237 | { |
238 | - $optionsConfig = [ 'options' => $optionsConfig ]; |
|
238 | + $optionsConfig = ['options' => $optionsConfig]; |
|
239 | 239 | $services = $this->getMockBuilder('Laminas\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock(); |
240 | 240 | |
241 | 241 | $services->expects($this->once())->method('get')->with('config')->willReturn($optionsConfig); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | class SimpleOptionsMock extends AbstractOptions |
248 | 248 | { |
249 | 249 | protected $one = "One"; |
250 | - protected $two= "Two"; |
|
250 | + protected $two = "Two"; |
|
251 | 251 | |
252 | 252 | /** |
253 | 253 | * @param string $one |