@@ -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 | { |
@@ -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 | } |
@@ -94,7 +94,7 @@ |
||
94 | 94 | * @param null|string $expectedErrorKey |
95 | 95 | */ |
96 | 96 | public function testIsValidReturnsOnlyTrueIfEmailAndPrivacyPolicyIsSet($value, $expectedResult, |
97 | - $expectedErrorKey = null) |
|
97 | + $expectedErrorKey = null) |
|
98 | 98 | { |
99 | 99 | $expectedErrors = array(); |
100 | 100 | if (null !== $expectedErrorKey) { |
@@ -105,7 +105,7 @@ |
||
105 | 105 | } |
106 | 106 | } |
107 | 107 | |
108 | - $assertMethod = 'assert' . ($expectedResult ? 'True' : 'False'); |
|
108 | + $assertMethod = 'assert'.($expectedResult ? 'True' : 'False'); |
|
109 | 109 | |
110 | 110 | |
111 | 111 | $this->$assertMethod($this->target->isValid($value)); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * @covers Applications\Entity\Application::getJob |
68 | 68 | * @covers Applications\Entity\Application::setJob |
69 | 69 | */ |
70 | - public function testSetGetJob(){ |
|
70 | + public function testSetGetJob() { |
|
71 | 71 | $user = new User(); |
72 | 72 | $user->setId(123); |
73 | 73 | $job = new Job(); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * @covers Applications\Entity\Application::getContact |
81 | 81 | * @covers Applications\Entity\Application::setContact |
82 | 82 | */ |
83 | - public function testSetGetContactWithContact(){ |
|
83 | + public function testSetGetContactWithContact() { |
|
84 | 84 | $contact = new Contact(); |
85 | 85 | $contact->setEmail('[email protected]') |
86 | 86 | ->setLastName('bar') |
@@ -94,11 +94,11 @@ discard block |
||
94 | 94 | $this->assertEquals($contact, $this->target->getContact()); |
95 | 95 | } |
96 | 96 | |
97 | - public function testSetGetContactWithoutContact(){ |
|
97 | + public function testSetGetContactWithoutContact() { |
|
98 | 98 | $this->assertEquals(null, $this->target->getContact()); |
99 | 99 | } |
100 | 100 | |
101 | - public function testSetGetContactWithoutContact2(){ |
|
101 | + public function testSetGetContactWithoutContact2() { |
|
102 | 102 | $this->target->setContact(new Info()); |
103 | 103 | $this->assertEquals(new Contact(), $this->target->getContact()); |
104 | 104 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * @covers Applications\Entity\Application::getFacts |
108 | 108 | * @covers Applications\Entity\Application::setFacts |
109 | 109 | */ |
110 | - public function testSetGetFacts(){ |
|
110 | + public function testSetGetFacts() { |
|
111 | 111 | $facts = new Facts(); |
112 | 112 | $facts->setDrivingLicense(true) |
113 | 113 | ->setEarliestStartingDate(new \DateTime()) |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $this->assertEquals($facts, $this->target->getFacts()); |
119 | 119 | } |
120 | 120 | |
121 | - public function testGetFactsWithoutFacts(){ |
|
121 | + public function testGetFactsWithoutFacts() { |
|
122 | 122 | $this->assertEquals(new Facts(), $this->target->getFacts()); |
123 | 123 | } |
124 | 124 | |
@@ -126,9 +126,9 @@ discard block |
||
126 | 126 | * @covers Applications\Entity\Application::getCv |
127 | 127 | * @covers Applications\Entity\Application::setCv |
128 | 128 | */ |
129 | - public function testSetGetCv(){ |
|
129 | + public function testSetGetCv() { |
|
130 | 130 | $cv = new Cv(); |
131 | - $education= new Education(); |
|
131 | + $education = new Education(); |
|
132 | 132 | $education->setDescription('test'); |
133 | 133 | $educations = new ArrayCollection(); |
134 | 134 | $educations->add($education); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $this->assertEquals($cv, $this->target->getCv()); |
140 | 140 | } |
141 | 141 | |
142 | - public function testGetCvWithouCv(){ |
|
142 | + public function testGetCvWithouCv() { |
|
143 | 143 | $this->assertEquals(new Cv(), $this->target->getCv()); |
144 | 144 | } |
145 | 145 | |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * @covers Applications\Entity\Application::getAttachments |
148 | 148 | * @covers Applications\Entity\Application::setAttachments |
149 | 149 | */ |
150 | - public function testSetGetAttachments(){ |
|
150 | + public function testSetGetAttachments() { |
|
151 | 151 | $attachment = new Attachment(); |
152 | 152 | $attachment->setName('foo'); |
153 | 153 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $this->assertEquals($attachments, $this->target->getAttachments()); |
160 | 160 | } |
161 | 161 | |
162 | - public function testGetAttachmentsWithoutAttachments(){ |
|
162 | + public function testGetAttachmentsWithoutAttachments() { |
|
163 | 163 | $this->assertEquals(new ArrayCollection(), $this->target->getAttachments()); |
164 | 164 | } |
165 | 165 | |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | * @covers Applications\Entity\Application::setReadBy |
169 | 169 | * @covers Applications\Entity\Application::getReadBy |
170 | 170 | */ |
171 | - public function testSetGetReadBy(){ |
|
171 | + public function testSetGetReadBy() { |
|
172 | 172 | $readBy = [ |
173 | 173 | new \MongoId(), |
174 | 174 | new \MongoId() |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * @covers Applications\Entity\Application::getComments |
224 | 224 | * @covers Applications\Entity\Application::setComments |
225 | 225 | */ |
226 | - public function testSetGetComments(){ |
|
226 | + public function testSetGetComments() { |
|
227 | 227 | $comment = new Comment(); |
228 | 228 | $comment->setMessage('test foo bar') |
229 | 229 | ->setDateCreated(new \DateTime()) |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | $this->assertEquals($comments, $this->target->getComments()); |
237 | 237 | } |
238 | 238 | |
239 | - public function testGetCommentsWithoutComments(){ |
|
239 | + public function testGetCommentsWithoutComments() { |
|
240 | 240 | $this->assertEquals(new ArrayCollection(), $this->target->getComments()); |
241 | 241 | } |
242 | 242 | |
@@ -244,8 +244,8 @@ discard block |
||
244 | 244 | * @covers Applications\Entity\Application::getHistory |
245 | 245 | * @covers Applications\Entity\Application::setHistory |
246 | 246 | */ |
247 | - public function testSetGetHistory(){ |
|
248 | - $history = new History(Status::INCOMING,'MESSAGE'); |
|
247 | + public function testSetGetHistory() { |
|
248 | + $history = new History(Status::INCOMING, 'MESSAGE'); |
|
249 | 249 | |
250 | 250 | $array = new ArrayCollection(); |
251 | 251 | $array->add($history); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $this->assertEquals($array, $this->target->getHistory()); |
255 | 255 | } |
256 | 256 | |
257 | - public function testGetEmptyHistory(){ |
|
257 | + public function testGetEmptyHistory() { |
|
258 | 258 | $this->assertEquals(new ArrayCollection(), $this->target->getHistory()); |
259 | 259 | } |
260 | 260 | |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | * @covers Applications\Entity\Application::getAttributes |
263 | 263 | * @covers Applications\Entity\Application::setAttributes |
264 | 264 | */ |
265 | - public function testSetGetAttributes(){ |
|
265 | + public function testSetGetAttributes() { |
|
266 | 266 | $attributes = new Attributes(); |
267 | 267 | $attributes->setSendCarbonCopy(true) |
268 | 268 | ->setAcceptedPrivacyPolicy(true); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | $this->assertEquals($attributes, $this->target->getAttributes()); |
273 | 273 | } |
274 | 274 | |
275 | - public function testGetAttributesWithoutAttributes(){ |
|
275 | + public function testGetAttributesWithoutAttributes() { |
|
276 | 276 | $this->assertEquals(new Attributes(), $this->target->getAttributes()); |
277 | 277 | } |
278 | 278 | |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | */ |
298 | 298 | public function testSetGetKeywords() |
299 | 299 | { |
300 | - $input = array('Sehr',' geehrte',' Damen' ,'und' ,'Herren'); |
|
300 | + $input = array('Sehr', ' geehrte', ' Damen', 'und', 'Herren'); |
|
301 | 301 | $this->target->setKeywords($input); |
302 | 302 | $this->assertEquals($input, $this->target->getKeywords()); |
303 | 303 | $this->target->clearKeywords(); |
@@ -320,8 +320,8 @@ discard block |
||
320 | 320 | public function provideSetGetDraft() |
321 | 321 | { |
322 | 322 | return [ |
323 | - [true,true], |
|
324 | - [false,false] |
|
323 | + [true, true], |
|
324 | + [false, false] |
|
325 | 325 | ]; |
326 | 326 | } |
327 | 327 | |
@@ -351,11 +351,11 @@ discard block |
||
351 | 351 | public function providerSetGetApplicationStatus() |
352 | 352 | { |
353 | 353 | return [ |
354 | - [Status::REJECTED,new Status(Status::REJECTED)], |
|
355 | - [Status::INVITED,new Status(Status::INVITED)], |
|
356 | - [Status::INCOMING,new Status(Status::INCOMING)], |
|
357 | - [Status::CONFIRMED,new Status(Status::CONFIRMED)], |
|
358 | - [new Status(Status::CONFIRMED),new Status(Status::CONFIRMED)], |
|
354 | + [Status::REJECTED, new Status(Status::REJECTED)], |
|
355 | + [Status::INVITED, new Status(Status::INVITED)], |
|
356 | + [Status::INCOMING, new Status(Status::INCOMING)], |
|
357 | + [Status::CONFIRMED, new Status(Status::CONFIRMED)], |
|
358 | + [new Status(Status::CONFIRMED), new Status(Status::CONFIRMED)], |
|
359 | 359 | ]; |
360 | 360 | } |
361 | 361 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * @covers \Applications\Entity\Settings::setMailAccess |
53 | 53 | * @covers \Applications\Entity\Settings::getMailAccess |
54 | 54 | */ |
55 | - public function testSetGetMailAccess($input,$expected){ |
|
55 | + public function testSetGetMailAccess($input, $expected) { |
|
56 | 56 | $this->target->setMailAccess($input); |
57 | 57 | $this->assertEquals($this->target->getMailAccess(), $expected); |
58 | 58 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | return [ |
64 | 64 | [1, true], |
65 | 65 | [true, true], |
66 | - [false,false], |
|
66 | + [false, false], |
|
67 | 67 | ["1", true], |
68 | 68 | ]; |
69 | 69 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function testSetGetSubject() |
56 | 56 | { |
57 | - $input="subject of the mail"; |
|
57 | + $input = "subject of the mail"; |
|
58 | 58 | $this->target->setSubject($input); |
59 | 59 | $this->assertEquals($this->target->getSubject(), $input); |
60 | 60 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function testSetGetMailText() |
67 | 67 | { |
68 | - $input="this is the mailtext"; |
|
68 | + $input = "this is the mailtext"; |
|
69 | 69 | $this->target->setMailText($input); |
70 | 70 | $this->assertEquals($this->target->getMailText(), $input); |
71 | 71 | } |