@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $this->assertContains("'default_db' => 'TestDbName'", $result); |
56 | 56 | $this->assertContains("'connectionString' => 'mongodb://server/TestDbName'", $result); |
57 | 57 | $this->assertContains("'core_options'", $result); |
58 | - $this->assertContains("'system_message_email' => 'test@email'", $result ); |
|
58 | + $this->assertContains("'system_message_email' => 'test@email'", $result); |
|
59 | 59 | |
60 | 60 | $result = $this->target->process('mongodb://server', 'test@email'); |
61 | 61 | |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | |
65 | 65 | public function testWritingConfigFileWorks() |
66 | 66 | { |
67 | - $dir = sys_get_temp_dir() . '/YawikConfigCreator-' . uniqid(); |
|
67 | + $dir = sys_get_temp_dir().'/YawikConfigCreator-'.uniqid(); |
|
68 | 68 | |
69 | 69 | mkdir($dir); |
70 | - mkdir($dir . '/config'); |
|
71 | - mkdir($dir . '/config/autoload'); |
|
70 | + mkdir($dir.'/config'); |
|
71 | + mkdir($dir.'/config/autoload'); |
|
72 | 72 | |
73 | 73 | chdir($dir); |
74 | 74 |
@@ -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 |
@@ -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 | { |
@@ -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 | { |
@@ -43,11 +43,11 @@ discard block |
||
43 | 43 | ], |
44 | 44 | ]; |
45 | 45 | |
46 | - private $inheritance = [ AbstractPaginationQuery::class ]; |
|
46 | + private $inheritance = [AbstractPaginationQuery::class]; |
|
47 | 47 | |
48 | 48 | private $attributes = [ |
49 | 49 | 'repositoryName' => 'Applications/Application', |
50 | - 'sortPropertiesMap' => [ 'date' => 'dateCreated.date' ] |
|
50 | + 'sortPropertiesMap' => ['date' => 'dateCreated.date'] |
|
51 | 51 | ]; |
52 | 52 | |
53 | 53 | private $authMock; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | private function getTargetArgs() |
56 | 56 | { |
57 | 57 | $this->authMock = $this->getMockBuilder(AuthenticationService::class)->disableOriginalConstructor()->getMock(); |
58 | - return [ $this->authMock ]; |
|
58 | + return [$this->authMock]; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | private function getTargetArgsForCreateQueryTest() |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $auth = $this |
67 | 67 | ->getMockBuilder(AuthenticationService::class) |
68 | 68 | ->disableOriginalConstructor() |
69 | - ->setMethods(['getUser' ]) |
|
69 | + ->setMethods(['getUser']) |
|
70 | 70 | ->getMock() |
71 | 71 | ; |
72 | 72 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $qb1->expects($this->exactly(2))->method('sort')->with(['dateCreated.date' => -1])->will($this->returnSelf()); |
119 | 119 | |
120 | 120 | $qb2->expects($this->exactly(6))->method('field')->withConsecutive( |
121 | - [ 'job'], [ 'readBy'], ['keywords'], ['permissions.view'], ['isDraft'], ['status.name'] |
|
121 | + ['job'], ['readBy'], ['keywords'], ['permissions.view'], ['isDraft'], ['status.name'] |
|
122 | 122 | )->will($this->returnSelf()); |
123 | 123 | $qb2->expects($this->exactly(4))->method('equals')->withConsecutive( |
124 | 124 | [$params3['job']], ['PqtUser'], [false], [$params3['status']] |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | |
142 | 142 | public function __call($method, $args) { |
143 | - $this->callstack[] = [ $method, $args ]; |
|
143 | + $this->callstack[] = [$method, $args]; |
|
144 | 144 | |
145 | 145 | return $this; |
146 | 146 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function testSetGetDate() |
79 | 79 | { |
80 | - $input=new \DateTime("2012-05-06"); |
|
80 | + $input = new \DateTime("2012-05-06"); |
|
81 | 81 | $this->target->setDate($input); |
82 | 82 | $this->assertEquals($this->target->getDate(), $input); |
83 | 83 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | public function testSetGetStatus($status) |
91 | 91 | { |
92 | - $input=new Status($status); |
|
92 | + $input = new Status($status); |
|
93 | 93 | $this->target->setStatus($input); |
94 | 94 | $this->assertEquals($this->target->getStatus(), $input); |
95 | 95 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function testSetGetMessage() |
112 | 112 | { |
113 | - $input="this is my message"; |
|
113 | + $input = "this is my message"; |
|
114 | 114 | $this->target->setMessage($input); |
115 | 115 | $this->assertEquals($this->target->getMessage(), $input); |
116 | 116 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | public function testSetGetRating() |
48 | 48 | { |
49 | - $input="1"; |
|
49 | + $input = "1"; |
|
50 | 50 | $this->target->setRating($input); |
51 | 51 | $this->assertEquals($this->target->getRating(), $input); |
52 | 52 | } |