@@ -65,10 +65,10 @@ discard block |
||
65 | 65 | ->expects($this->exactly(2)) |
66 | 66 | ->method('get') |
67 | 67 | ->withConsecutive( |
68 | - ['FilterManager'],['doctrine.documentmanager.odm_default'] |
|
68 | + ['FilterManager'], ['doctrine.documentmanager.odm_default'] |
|
69 | 69 | ) |
70 | 70 | ->will($this->onConsecutiveCalls( |
71 | - $filters,$dm |
|
71 | + $filters, $dm |
|
72 | 72 | )) |
73 | 73 | ; |
74 | 74 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | ; |
87 | 87 | |
88 | 88 | /* @var \Install\Factory\Controller\Plugin\UserCreatorFactory $target */ |
89 | - $plugin = $target($services,'some-name',['connection' => 'some-connection']); |
|
89 | + $plugin = $target($services, 'some-name', ['connection' => 'some-connection']); |
|
90 | 90 | |
91 | 91 | $this->assertInstanceOf('\Install\Controller\Plugin\UserCreator', $plugin); |
92 | 92 | } |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | $credentialFilter = $this->createMock(CredentialFilter::class); |
52 | 52 | $dm = $this->createMock(DocumentManager::class); |
53 | 53 | |
54 | - $this->target = new UserCreator($credentialFilter,$dm); |
|
55 | - $this->credentialFilter= $credentialFilter; |
|
54 | + $this->target = new UserCreator($credentialFilter, $dm); |
|
55 | + $this->credentialFilter = $credentialFilter; |
|
56 | 56 | $this->documentManager = $dm; |
57 | 57 | } |
58 | 58 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | ; |
85 | 85 | |
86 | 86 | $target = $this->target; |
87 | - $target->process('foo','password','[email protected]'); |
|
87 | + $target->process('foo', 'password', '[email protected]'); |
|
88 | 88 | |
89 | 89 | $repository->expects($this->any()) |
90 | 90 | ->method('store') |
@@ -93,6 +93,6 @@ discard block |
||
93 | 93 | |
94 | 94 | $this->expectException(\Exception::class); |
95 | 95 | $this->expectExceptionMessage('some-exception'); |
96 | - $target->process('foo','password','[email protected]'); |
|
96 | + $target->process('foo', 'password', '[email protected]'); |
|
97 | 97 | } |
98 | 98 | } |
@@ -44,9 +44,9 @@ discard block |
||
44 | 44 | public function invalidConnectionStringProvider() |
45 | 45 | { |
46 | 46 | return [ |
47 | - [ 'noconnstr' ], |
|
48 | - [ 'mongodb://user name:pass@server' ], |
|
49 | - [ 'mongodb://server/db.with.dot' ], |
|
47 | + ['noconnstr'], |
|
48 | + ['mongodb://user name:pass@server'], |
|
49 | + ['mongodb://server/db.with.dot'], |
|
50 | 50 | ]; |
51 | 51 | } |
52 | 52 | |
@@ -57,26 +57,26 @@ discard block |
||
57 | 57 | { |
58 | 58 | $target = new MongoDbConnectionString(); |
59 | 59 | |
60 | - $this->assertFalse($target->isValid($connStr), 'Failed with: ' . $connStr); |
|
60 | + $this->assertFalse($target->isValid($connStr), 'Failed with: '.$connStr); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | public function validConnectionStringsProvider() |
64 | 64 | { |
65 | 65 | return [ |
66 | - [ 'mongodb://server' ], |
|
67 | - [ 'mongodb://server/database' ], |
|
68 | - [ 'mongodb://server:1234' ], |
|
69 | - [ 'mongodb://server:1234/database' ], |
|
70 | - [ 'mongodb://user@server' ], |
|
71 | - [ 'mongodb://user@server:1234' ], |
|
72 | - [ 'mongodb://user@server/database' ], |
|
73 | - [ 'mongodb://user@server:1234/database' ], |
|
74 | - [ 'mongodb://user:pass@server' ], |
|
75 | - [ 'mongodb://user:pass@server/database' ], |
|
76 | - [ 'mongodb://user:pass@server:1234' ], |
|
77 | - [ 'mongodb://user:pass@server:1234/database' ], |
|
78 | - [ 'mongodb://server:23432/dbName?option=value' ], |
|
79 | - [ 'mongodb://name:[email protected]:27017,cluster0-shard-00-01-nvwmc.mongodb.net:27017,cluster0-shard-00-02-nvwmc.mongodb.net:27017/?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin' ], |
|
66 | + ['mongodb://server'], |
|
67 | + ['mongodb://server/database'], |
|
68 | + ['mongodb://server:1234'], |
|
69 | + ['mongodb://server:1234/database'], |
|
70 | + ['mongodb://user@server'], |
|
71 | + ['mongodb://user@server:1234'], |
|
72 | + ['mongodb://user@server/database'], |
|
73 | + ['mongodb://user@server:1234/database'], |
|
74 | + ['mongodb://user:pass@server'], |
|
75 | + ['mongodb://user:pass@server/database'], |
|
76 | + ['mongodb://user:pass@server:1234'], |
|
77 | + ['mongodb://user:pass@server:1234/database'], |
|
78 | + ['mongodb://server:23432/dbName?option=value'], |
|
79 | + ['mongodb://name:[email protected]:27017,cluster0-shard-00-01-nvwmc.mongodb.net:27017,cluster0-shard-00-02-nvwmc.mongodb.net:27017/?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin'], |
|
80 | 80 | ]; |
81 | 81 | } |
82 | 82 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | { |
90 | 90 | $target = new MongoDbConnectionString(); |
91 | 91 | |
92 | - $this->assertTrue($target->isValid($connStr), 'Failed with: "' . $connStr . '"'); |
|
92 | + $this->assertTrue($target->isValid($connStr), 'Failed with: "'.$connStr.'"'); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | public function testInit() |
34 | 34 | { |
35 | 35 | $target = $this->getMockBuilder('\Install\Form\Installation') |
36 | - ->setMethods(array('add', 'setName', 'setAttributes')) |
|
37 | - ->disableOriginalConstructor() |
|
38 | - ->getMock(); |
|
36 | + ->setMethods(array('add', 'setName', 'setAttributes')) |
|
37 | + ->disableOriginalConstructor() |
|
38 | + ->getMock(); |
|
39 | 39 | |
40 | 40 | $add1 = array( |
41 | 41 | 'type' => 'Text', |
@@ -73,18 +73,18 @@ discard block |
||
73 | 73 | ); |
74 | 74 | |
75 | 75 | $target->expects($this->exactly(4)) |
76 | - ->method('add') |
|
77 | - ->withConsecutive( |
|
78 | - array($add1), |
|
79 | - array($add2), |
|
80 | - array($add3), |
|
81 | - array($add4) |
|
82 | - )->will($this->returnSelf()); |
|
76 | + ->method('add') |
|
77 | + ->withConsecutive( |
|
78 | + array($add1), |
|
79 | + array($add2), |
|
80 | + array($add3), |
|
81 | + array($add4) |
|
82 | + )->will($this->returnSelf()); |
|
83 | 83 | |
84 | 84 | $target->expects($this->once())->method('setName')->with('installation'); |
85 | 85 | $target->expects($this->once())->method('setAttributes')->with(array( |
86 | - 'method' => 'post', |
|
87 | - ) |
|
86 | + 'method' => 'post', |
|
87 | + ) |
|
88 | 88 | ); |
89 | 89 | /* @var $target \PHPUnit_Framework_MockObject_MockObject|\Install\Form\Installation */ |
90 | 90 | $target->init(); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | ), |
102 | 102 | 'validators' => array( |
103 | 103 | array('name' => MongoDbConnectionString::class, |
104 | - 'break_chain_on_failure' => true), |
|
104 | + 'break_chain_on_failure' => true), |
|
105 | 105 | array('name' => MongoDbConnection::class), |
106 | 106 | ), |
107 | 107 | ), |
@@ -35,9 +35,9 @@ |
||
35 | 35 | private $target = [ |
36 | 36 | JobSelectFactory::class, |
37 | 37 | '@testCreateService' => [ |
38 | - 'mock' => [ |
|
39 | - '__invoke' => ['@with' => 'getServiceManagerMock', 'count' => 1] |
|
40 | - ] |
|
38 | + 'mock' => [ |
|
39 | + '__invoke' => ['@with' => 'getServiceManagerMock', 'count' => 1] |
|
40 | + ] |
|
41 | 41 | ], |
42 | 42 | ]; |
43 | 43 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ], |
42 | 42 | ]; |
43 | 43 | |
44 | - private $inheritance = [ FactoryInterface::class ]; |
|
44 | + private $inheritance = [FactoryInterface::class]; |
|
45 | 45 | |
46 | 46 | public function testCreateService() |
47 | 47 | { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | ->setMethods(['find'])->getMock(); |
78 | 78 | $repository->expects($this->once())->method('find')->with($jobId)->will($this->returnValue($job)); |
79 | 79 | |
80 | - $repositories = $this->createPluginManagerMock(['Jobs' => $repository],$this->getServiceManagerMock()); |
|
80 | + $repositories = $this->createPluginManagerMock(['Jobs' => $repository], $this->getServiceManagerMock()); |
|
81 | 81 | $services['repositories'] = ['service' => $repositories, 'count' => 1]; |
82 | 82 | } else { |
83 | 83 | $services['repositories'] = ['service' => null, 'count' => 0]; |
@@ -39,12 +39,12 @@ |
||
39 | 39 | StatusSelectFactory::class, |
40 | 40 | '@testCreateService' => [ |
41 | 41 | 'mock' => [ |
42 | - '__invoke' => ['@with' => 'getInvokeMockArgs','count' => 1] |
|
42 | + '__invoke' => ['@with' => 'getInvokeMockArgs', 'count' => 1] |
|
43 | 43 | ] |
44 | 44 | ], |
45 | 45 | ]; |
46 | 46 | |
47 | - private $inheritance = [ FactoryInterface::class ]; |
|
47 | + private $inheritance = [FactoryInterface::class]; |
|
48 | 48 | |
49 | 49 | private function getInvokeMockArgs() |
50 | 50 | { |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | private $target = [ |
39 | 39 | JobSelectValuesFactory::class, |
40 | 40 | '@testCreateService' => [ |
41 | - 'mock' => [ |
|
42 | - '__invoke' => ['@with' => 'getInvokeArgs', 'count' => 1] |
|
43 | - ] |
|
41 | + 'mock' => [ |
|
42 | + '__invoke' => ['@with' => 'getInvokeArgs', 'count' => 1] |
|
43 | + ] |
|
44 | 44 | ], |
45 | 45 | ]; |
46 | 46 | |
@@ -59,13 +59,13 @@ discard block |
||
59 | 59 | public function testServiceCreation() |
60 | 60 | { |
61 | 61 | $paginator = $this |
62 | - ->getMockBuilder(JobSelectPaginator::class) |
|
63 | - ->disableOriginalConstructor() |
|
64 | - ->getMock() |
|
62 | + ->getMockBuilder(JobSelectPaginator::class) |
|
63 | + ->disableOriginalConstructor() |
|
64 | + ->getMock() |
|
65 | 65 | ; |
66 | 66 | $paginators = $this->createPluginManagerMock( |
67 | - [JobSelectPaginator::class => $paginator], |
|
68 | - $this->getServiceManagerMock() |
|
67 | + [JobSelectPaginator::class => $paginator], |
|
68 | + $this->getServiceManagerMock() |
|
69 | 69 | ); |
70 | 70 | $container = $this->createServiceManagerMock(['Core/PaginatorService' => $paginators]); |
71 | 71 |
@@ -44,7 +44,7 @@ |
||
44 | 44 | ], |
45 | 45 | ]; |
46 | 46 | |
47 | - private $inheritance = [ FactoryInterface::class ]; |
|
47 | + private $inheritance = [FactoryInterface::class]; |
|
48 | 48 | |
49 | 49 | private function getInvokeArgs() |
50 | 50 | { |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | private $target = [ |
40 | 40 | JobSelectPaginatorFactory::class, |
41 | 41 | '@testCreateService' => [ |
42 | - 'mock' => [ |
|
43 | - '__invoke' => ['@with' => 'getInvokeArgs', 'count' => 1] |
|
44 | - ] |
|
42 | + 'mock' => [ |
|
43 | + '__invoke' => ['@with' => 'getInvokeArgs', 'count' => 1] |
|
44 | + ] |
|
45 | 45 | ], |
46 | 46 | ]; |
47 | 47 | |
@@ -60,15 +60,15 @@ discard block |
||
60 | 60 | public function testServiceCreation() |
61 | 61 | { |
62 | 62 | $repository = $this |
63 | - ->getMockBuilder(Job::class) |
|
64 | - ->disableOriginalConstructor() |
|
65 | - ->getMock() |
|
63 | + ->getMockBuilder(Job::class) |
|
64 | + ->disableOriginalConstructor() |
|
65 | + ->getMock() |
|
66 | 66 | ; |
67 | 67 | $repositories = $this |
68 | - ->createPluginManagerMock( |
|
69 | - ['Jobs' => $repository], |
|
70 | - $this->getServiceManagerMock() |
|
71 | - ) |
|
68 | + ->createPluginManagerMock( |
|
69 | + ['Jobs' => $repository], |
|
70 | + $this->getServiceManagerMock() |
|
71 | + ) |
|
72 | 72 | ; |
73 | 73 | $container = $this->createServiceManagerMock(['repositories' => $repositories]); |
74 | 74 |
@@ -44,7 +44,7 @@ |
||
44 | 44 | ], |
45 | 45 | ]; |
46 | 46 | |
47 | - private $inheritance = [ FactoryInterface::class ]; |
|
47 | + private $inheritance = [FactoryInterface::class]; |
|
48 | 48 | |
49 | 49 | private function getInvokeArgs() |
50 | 50 | { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | private $target = PaginationQueryFactory::class; |
37 | 37 | |
38 | - private $inheritance = [ FactoryInterface::class ]; |
|
38 | + private $inheritance = [FactoryInterface::class]; |
|
39 | 39 | |
40 | 40 | public function testCreateService() |
41 | 41 | { |