@@ -44,10 +44,10 @@ discard block |
||
44 | 44 | public function serviceNamesProvider() |
45 | 45 | { |
46 | 46 | return [ |
47 | - [ 'Repository/Core/FileEntity', true ], |
|
48 | - [ 'Core/FileEntity', true ], |
|
49 | - [ 'Repository/NoModuleWillBeEverCalledThat/SomeEntity', false ], |
|
50 | - [ 'ThisIsAHighlyUnCommonModuleName/ObscureEntity', false ], |
|
47 | + ['Repository/Core/FileEntity', true], |
|
48 | + ['Core/FileEntity', true], |
|
49 | + ['Repository/NoModuleWillBeEverCalledThat/SomeEntity', false], |
|
50 | + ['ThisIsAHighlyUnCommonModuleName/ObscureEntity', false], |
|
51 | 51 | ]; |
52 | 52 | } |
53 | 53 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | ->disableOriginalConstructor() |
66 | 66 | ->getMock() |
67 | 67 | ; |
68 | - $method = "assert" . ($expected ? 'True' : 'False'); |
|
68 | + $method = "assert".($expected ? 'True' : 'False'); |
|
69 | 69 | |
70 | 70 | $this->{$method}($this->target->canCreate($sm, $serviceName)); |
71 | 71 | } |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | public function servicesProvider() |
74 | 74 | { |
75 | 75 | return [ |
76 | - [ 'Repository/Core/TestEntity', '\Core\Entity\TestEntity', [], false ], |
|
77 | - [ 'Core/TestEntity', '\Core\Entity\TestEntity', [ 'testOption' => 'testValue' ], true ] |
|
76 | + ['Repository/Core/TestEntity', '\Core\Entity\TestEntity', [], false], |
|
77 | + ['Core/TestEntity', '\Core\Entity\TestEntity', ['testOption' => 'testValue'], true] |
|
78 | 78 | ]; |
79 | 79 | } |
80 | 80 | |
@@ -108,19 +108,19 @@ discard block |
||
108 | 108 | ->disableOriginalConstructor() |
109 | 109 | ->setMethods(['has', 'get'])->getMockForAbstractClass(); |
110 | 110 | |
111 | - $filters->expects($this->once())->method('has')->with('PaginationQuery/' . $serviceName)->willReturn($hasFilter); |
|
111 | + $filters->expects($this->once())->method('has')->with('PaginationQuery/'.$serviceName)->willReturn($hasFilter); |
|
112 | 112 | |
113 | 113 | if ($hasFilter) { |
114 | 114 | $filter = $this->getMockBuilder('\Zend\Filter\FilterInterface')->getMockForAbstractClass(); |
115 | 115 | $filter->expects($this->once())->method('filter')->with($options, $qb)->willReturn($qb); |
116 | 116 | |
117 | - $filters->expects($this->once())->method('get')->with('PaginationQuery/' . $serviceName)->willReturn($filter); |
|
117 | + $filters->expects($this->once())->method('get')->with('PaginationQuery/'.$serviceName)->willReturn($filter); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | $sm = $this->getMockBuilder('\Zend\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock(); |
121 | 121 | |
122 | 122 | $sm->expects($this->exactly(2))->method('get') |
123 | - ->withConsecutive([ 'repositories' ], [ 'FilterManager']) |
|
123 | + ->withConsecutive(['repositories'], ['FilterManager']) |
|
124 | 124 | ->will($this->onConsecutiveCalls($repositories, $filters)); |
125 | 125 | |
126 | 126 | $target = $this->target; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | protected function setUp() |
36 | 36 | { |
37 | - $getEntryMock = function ($id) { |
|
37 | + $getEntryMock = function($id) { |
|
38 | 38 | $entry = $this->getMockBuilder(\stdClass::class) |
39 | 39 | ->setMethods(['getId']) |
40 | 40 | ->getMock(); |
@@ -291,11 +291,11 @@ discard block |
||
291 | 291 | public function testExistsWithKey() |
292 | 292 | { |
293 | 293 | $searchKey = key($this->entries); |
294 | - $this->assertTrue($this->identityWrapper->exists(function ($key) use ($searchKey) { |
|
294 | + $this->assertTrue($this->identityWrapper->exists(function($key) use ($searchKey) { |
|
295 | 295 | return $key === $searchKey; |
296 | 296 | })); |
297 | 297 | $searchKey = 'non-existent'; |
298 | - $this->assertFalse($this->identityWrapper->exists(function ($key) use ($searchKey) { |
|
298 | + $this->assertFalse($this->identityWrapper->exists(function($key) use ($searchKey) { |
|
299 | 299 | return $key === $searchKey; |
300 | 300 | })); |
301 | 301 | } |
@@ -306,11 +306,11 @@ discard block |
||
306 | 306 | public function testExistsWithValue() |
307 | 307 | { |
308 | 308 | $searchValue = current($this->entries); |
309 | - $this->assertTrue($this->identityWrapper->exists(function ($key, $value) use ($searchValue) { |
|
309 | + $this->assertTrue($this->identityWrapper->exists(function($key, $value) use ($searchValue) { |
|
310 | 310 | return $value === $searchValue; |
311 | 311 | })); |
312 | 312 | $searchValue = 'non-existent'; |
313 | - $this->assertFalse($this->identityWrapper->exists(function ($key, $value) use ($searchValue) { |
|
313 | + $this->assertFalse($this->identityWrapper->exists(function($key, $value) use ($searchValue) { |
|
314 | 314 | return $value === $searchValue; |
315 | 315 | })); |
316 | 316 | } |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | public function testFilter() |
322 | 322 | { |
323 | 323 | $searchValue = current($this->entries); |
324 | - $filter = function ($value) use ($searchValue) { |
|
324 | + $filter = function($value) use ($searchValue) { |
|
325 | 325 | return $value === $searchValue; |
326 | 326 | }; |
327 | 327 | $filtered = $this->identityWrapper->filter($filter); |
@@ -336,11 +336,11 @@ discard block |
||
336 | 336 | public function testForAllWithKey() |
337 | 337 | { |
338 | 338 | $keys = array_keys($this->entries); |
339 | - $this->assertTrue($this->identityWrapper->forAll(function ($key) use ($keys) { |
|
339 | + $this->assertTrue($this->identityWrapper->forAll(function($key) use ($keys) { |
|
340 | 340 | return in_array($key, $keys); |
341 | 341 | })); |
342 | 342 | $keys = ['non-existent']; |
343 | - $this->assertFalse($this->identityWrapper->forAll(function ($key) use ($keys) { |
|
343 | + $this->assertFalse($this->identityWrapper->forAll(function($key) use ($keys) { |
|
344 | 344 | return in_array($key, $keys); |
345 | 345 | })); |
346 | 346 | } |
@@ -351,11 +351,11 @@ discard block |
||
351 | 351 | public function testForAllWithValue() |
352 | 352 | { |
353 | 353 | $values = array_values($this->entries); |
354 | - $this->assertTrue($this->identityWrapper->forAll(function ($key, $value) use ($values) { |
|
354 | + $this->assertTrue($this->identityWrapper->forAll(function($key, $value) use ($values) { |
|
355 | 355 | return in_array($value, $values, true); |
356 | 356 | })); |
357 | 357 | $values = ['non-existent']; |
358 | - $this->assertFalse($this->identityWrapper->forAll(function ($key, $value) use ($values) { |
|
358 | + $this->assertFalse($this->identityWrapper->forAll(function($key, $value) use ($values) { |
|
359 | 359 | return in_array($value, $values, true); |
360 | 360 | })); |
361 | 361 | } |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | */ |
366 | 366 | public function testMapValidOperation() |
367 | 367 | { |
368 | - $map = function ($value) { |
|
368 | + $map = function($value) { |
|
369 | 369 | $value->random = rand(); |
370 | 370 | return $value; |
371 | 371 | }; |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | */ |
382 | 382 | public function testMapInvalidOperation() |
383 | 383 | { |
384 | - $map = function ($value) { |
|
384 | + $map = function($value) { |
|
385 | 385 | return sprintf('id: %s', $value->getId()); |
386 | 386 | }; |
387 | 387 | $this->identityWrapper->map($map); |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | public function testPartitionWithKey() |
394 | 394 | { |
395 | 395 | $searchKey = key($this->entries); |
396 | - $partitions = $this->identityWrapper->partition(function ($key) use ($searchKey) { |
|
396 | + $partitions = $this->identityWrapper->partition(function($key) use ($searchKey) { |
|
397 | 397 | return $key === $searchKey; |
398 | 398 | }); |
399 | 399 | $expectedFirstPartiton = array_slice($this->entries, 0, 1, true); |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | public function testPartitionWithValue() |
413 | 413 | { |
414 | 414 | $searchValue = reset($this->entries); |
415 | - $partitions = $this->identityWrapper->partition(function ($key, $value) use ($searchValue) { |
|
415 | + $partitions = $this->identityWrapper->partition(function($key, $value) use ($searchValue) { |
|
416 | 416 | return $value === $searchValue; |
417 | 417 | }); |
418 | 418 | $expectedFirstPartiton = array_slice($this->entries, 0, 1, true); |
@@ -554,8 +554,8 @@ discard block |
||
554 | 554 | public function testSetIdentityExtractor() |
555 | 555 | { |
556 | 556 | $suffix = '.suffix'; |
557 | - $identityExtractor = function ($entry) use ($suffix) { |
|
558 | - return $entry->getId() . $suffix; |
|
557 | + $identityExtractor = function($entry) use ($suffix) { |
|
558 | + return $entry->getId().$suffix; |
|
559 | 559 | }; |
560 | 560 | |
561 | 561 | $this->assertSame($this->identityWrapper, $this->identityWrapper->setIdentityExtractor($identityExtractor)); |
@@ -32,12 +32,12 @@ |
||
32 | 32 | |
33 | 33 | private $target = ImageSetOptions::class; |
34 | 34 | |
35 | - private $inheritance = [ AbstractOptions::class ]; |
|
35 | + private $inheritance = [AbstractOptions::class]; |
|
36 | 36 | |
37 | 37 | private $properties = [ |
38 | 38 | ['entityClass', ['default' => Image::class, '@value' => Image::class]], |
39 | 39 | ['formElementName', ['default' => ImageSetInterface::ORIGINAL, 'value' => 'formElementNameValue']], |
40 | - ['images', ['default'=>[ImageSetInterface::THUMBNAIL => [100,100]], 'value' => ['a' => [1,1]]]], |
|
40 | + ['images', ['default'=>[ImageSetInterface::THUMBNAIL => [100, 100]], 'value' => ['a' => [1, 1]]]], |
|
41 | 41 | ['entity', ['ignore_setter' => true, 'value@' => Image::class]], |
42 | 42 | ]; |
43 | 43 | } |
@@ -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'); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | protected function setUp() |
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('\Zend\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() |
@@ -67,11 +67,11 @@ discard block |
||
67 | 67 | $addressList = new AddressList(); |
68 | 68 | $addressValue = ArrayUtils::iteratorToArray($addressList); |
69 | 69 | return [ |
70 | - ['variables',[ |
|
70 | + ['variables', [ |
|
71 | 71 | 'value' => ['some' => 'value'], |
72 | 72 | 'default' => [], |
73 | 73 | ]], |
74 | - ['variables',[ |
|
74 | + ['variables', [ |
|
75 | 75 | 'value' => $this, |
76 | 76 | 'setter_exception' => [ |
77 | 77 | \InvalidArgumentException::class, |
@@ -79,30 +79,30 @@ discard block |
||
79 | 79 | ], |
80 | 80 | |
81 | 81 | ]], |
82 | - ['variables',[ |
|
82 | + ['variables', [ |
|
83 | 83 | 'value' => $addressList, |
84 | 84 | 'expect' => $addressValue |
85 | 85 | ]], |
86 | - ['template',[ |
|
86 | + ['template', [ |
|
87 | 87 | 'value' => 'some-template', |
88 | 88 | 'default' => null |
89 | 89 | ]], |
90 | - ['callbacks',[ |
|
90 | + ['callbacks', [ |
|
91 | 91 | 'value' => [ |
92 | - 'some' => [$this,'someCallback'] |
|
92 | + 'some' => [$this, 'someCallback'] |
|
93 | 93 | ], |
94 | 94 | 'default' => array(), |
95 | 95 | ]], |
96 | - ['callbacks',[ |
|
96 | + ['callbacks', [ |
|
97 | 97 | 'value' => $this, |
98 | 98 | 'setter_exception' => [ |
99 | 99 | \InvalidArgumentException::class, |
100 | 100 | 'Expect an array or an instance of \Traversable, but received' |
101 | 101 | ] |
102 | 102 | ]], |
103 | - ['callbacks',[ |
|
103 | + ['callbacks', [ |
|
104 | 104 | 'value' => [ |
105 | - 'uncallable' => [$this,'notCallable'] |
|
105 | + 'uncallable' => [$this, 'notCallable'] |
|
106 | 106 | ], |
107 | 107 | 'setter_exception' => [ |
108 | 108 | \InvalidArgumentException::class, |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | public function testGetBodyText() |
116 | 116 | { |
117 | 117 | $translator = $this->createMock(TranslatorInterface::class); |
118 | - $target = new StringTemplateMessage(); |
|
118 | + $target = new StringTemplateMessage(); |
|
119 | 119 | $target->setTranslator($translator); |
120 | 120 | |
121 | 121 | $translator->expects($this->any()) |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | trim($target->getSubject()) |
156 | 156 | ); |
157 | 157 | |
158 | - $target->setCallback('callback', function () { |
|
158 | + $target->setCallback('callback', function() { |
|
159 | 159 | return 'Hello From Callback!'; |
160 | 160 | }); |
161 | 161 | $target->setCallback('object', 'getSubject'); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $options = $this->createMock(FileOptions::class); |
36 | 36 | $options->expects($this->once()) |
37 | 37 | ->method('getCallback') |
38 | - ->willReturn([$this,'getFileName']) |
|
38 | + ->willReturn([$this, 'getFileName']) |
|
39 | 39 | ; |
40 | 40 | $options->expects($this->exactly(2)) |
41 | 41 | ->method('getPath') |
@@ -38,11 +38,11 @@ |
||
38 | 38 | */ |
39 | 39 | private $target = TranslatorAwareMessage::class; |
40 | 40 | |
41 | - private $inheritance = [ Message::class, TranslatorAwareInterface::class ]; |
|
41 | + private $inheritance = [Message::class, TranslatorAwareInterface::class]; |
|
42 | 42 | |
43 | 43 | public function propertiesProvider() |
44 | 44 | { |
45 | - $setTranslator = function () { |
|
45 | + $setTranslator = function() { |
|
46 | 46 | $this->target->setTranslator(new Translator()); |
47 | 47 | }; |
48 | 48 |
@@ -48,9 +48,9 @@ |
||
48 | 48 | ->method('get') |
49 | 49 | ->willReturnMap( |
50 | 50 | [ |
51 | - ['Config',[]], |
|
52 | - ['Auth/Options',$authOptions], |
|
53 | - ['Core/MailServiceOptions',$mailOptions] |
|
51 | + ['Config', []], |
|
52 | + ['Auth/Options', $authOptions], |
|
53 | + ['Core/MailServiceOptions', $mailOptions] |
|
54 | 54 | ] |
55 | 55 | ); |
56 | 56 |