@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @param string $module |
66 | 66 | * @dataProvider getTestInvoke |
67 | 67 | */ |
68 | - public function testInvoke($config, $key=null, $module=null, $expected=null) |
|
68 | + public function testInvoke($config, $key = null, $module = null, $expected = null) |
|
69 | 69 | { |
70 | 70 | $plugin = new Config($config); |
71 | 71 | $plugin->setController($this->getController()); |
@@ -87,11 +87,11 @@ discard block |
||
87 | 87 | ]; |
88 | 88 | |
89 | 89 | return [ |
90 | - [ $config, 'dashboard', 'Jobs', $config['Jobs']['dashboard'] ], |
|
91 | - [ $config, 'dashboard', ['Jobs','Applications'], $combinedOutput ], |
|
92 | - [ $config, 'settings', null, $config['Core']['settings'] ], |
|
93 | - [ $config, 'Core', true, $config['Core'] ], |
|
94 | - [ $config, ['dashboard','form'],['Jobs','Application'], ['Jobs' =>$config['Jobs']] ], |
|
90 | + [$config, 'dashboard', 'Jobs', $config['Jobs']['dashboard']], |
|
91 | + [$config, 'dashboard', ['Jobs', 'Applications'], $combinedOutput], |
|
92 | + [$config, 'settings', null, $config['Core']['settings']], |
|
93 | + [$config, 'Core', true, $config['Core']], |
|
94 | + [$config, ['dashboard', 'form'], ['Jobs', 'Application'], ['Jobs' =>$config['Jobs']]], |
|
95 | 95 | ]; |
96 | 96 | } |
97 | 97 |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $request = $this->createMock(Request::class); |
48 | 48 | |
49 | 49 | $target = $this->getMockBuilder(ContentController::class) |
50 | - ->setMethods(['getRequest','getPluginManager']) |
|
50 | + ->setMethods(['getRequest', 'getPluginManager']) |
|
51 | 51 | ->getMock() |
52 | 52 | ; |
53 | 53 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $request = $this->createMock(Request::class); |
100 | 100 | |
101 | 101 | $target = $this->getMockBuilder(ContentController::class) |
102 | - ->setMethods(['getRequest','getPluginManager']) |
|
102 | + ->setMethods(['getRequest', 'getPluginManager']) |
|
103 | 103 | ->getMock() |
104 | 104 | ; |
105 | 105 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | /** |
47 | 47 | * @return IndexController |
48 | 48 | */ |
49 | - public function setupTarget($auth=null, $layout=null, $forward=null, $config=null) |
|
49 | + public function setupTarget($auth = null, $layout = null, $forward = null, $config = null) |
|
50 | 50 | { |
51 | 51 | $auth->expects($this->any()) |
52 | 52 | ->method('__invoke') |
@@ -59,10 +59,10 @@ discard block |
||
59 | 59 | $plugins->expects($this->any()) |
60 | 60 | ->method('get') |
61 | 61 | ->willReturnMap([ |
62 | - ['Auth',null,$auth], |
|
63 | - ['layout',null,$layout], |
|
64 | - ['forward',null,$forward], |
|
65 | - ['config',null,$config] |
|
62 | + ['Auth', null, $auth], |
|
63 | + ['layout', null, $layout], |
|
64 | + ['forward', null, $forward], |
|
65 | + ['config', null, $config] |
|
66 | 66 | ]) |
67 | 67 | ; |
68 | 68 | $this->pluginsMock = $plugins; |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | ->method('dispatch') |
153 | 153 | ->with( |
154 | 154 | 'Jobs/Index', |
155 | - ['action' => 'dashboard','type'=>'recent'] |
|
155 | + ['action' => 'dashboard', 'type'=>'recent'] |
|
156 | 156 | ) |
157 | 157 | ->willReturnOnConsecutiveCalls(null, $viewModel) |
158 | 158 | ; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | ; |
166 | 166 | |
167 | 167 | $target = $this->getMockBuilder(IndexController::class) |
168 | - ->setConstructorArgs([$this->moduleManager,$this->config]) |
|
168 | + ->setConstructorArgs([$this->moduleManager, $this->config]) |
|
169 | 169 | ->setMethods(['getResponse']) |
170 | 170 | ->getMock() |
171 | 171 | ; |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | protected $target = SearchFormFactory::class; |
43 | 43 | |
44 | - protected $inheritance = [ FactoryInterface::class ]; |
|
44 | + protected $inheritance = [FactoryInterface::class]; |
|
45 | 45 | |
46 | 46 | public function testCreatesPluginAndInjectsFormElementManager() |
47 | 47 | { |
@@ -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 | } |
@@ -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() |
@@ -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 |