@@ -34,9 +34,9 @@ discard block |
||
| 34 | 34 | protected function setUp() |
| 35 | 35 | { |
| 36 | 36 | $this->target = $this->getMockBuilder('\Jobs\Form\CompanyNameFieldset') |
| 37 | - ->disableOriginalConstructor() |
|
| 38 | - ->setMethods(array('setAttribute', 'setName', 'add')) |
|
| 39 | - ->getMock(); |
|
| 37 | + ->disableOriginalConstructor() |
|
| 38 | + ->setMethods(array('setAttribute', 'setName', 'add')) |
|
| 39 | + ->getMock(); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -53,12 +53,12 @@ discard block |
||
| 53 | 53 | public function testInitialization() |
| 54 | 54 | { |
| 55 | 55 | $this->target->expects($this->once()) |
| 56 | - ->method('setAttribute') |
|
| 57 | - ->with('id', 'jobcompanyname-fieldset'); |
|
| 56 | + ->method('setAttribute') |
|
| 57 | + ->with('id', 'jobcompanyname-fieldset'); |
|
| 58 | 58 | |
| 59 | 59 | $this->target->expects($this->once()) |
| 60 | - ->method('setName') |
|
| 61 | - ->with('jobCompanyName'); |
|
| 60 | + ->method('setName') |
|
| 61 | + ->with('jobCompanyName'); |
|
| 62 | 62 | |
| 63 | 63 | $addParam1 = array( |
| 64 | 64 | 'type' => 'Jobs/HiringOrganizationSelect', |
@@ -93,10 +93,10 @@ discard block |
||
| 93 | 93 | ]; |
| 94 | 94 | |
| 95 | 95 | $this->target->expects($this->exactly(2)) |
| 96 | - ->method('add') |
|
| 97 | - ->withConsecutive( |
|
| 98 | - [$addParam1], |
|
| 99 | - [$addParam2] |
|
| 96 | + ->method('add') |
|
| 97 | + ->withConsecutive( |
|
| 98 | + [$addParam1], |
|
| 99 | + [$addParam2] |
|
| 100 | 100 | ); |
| 101 | 101 | |
| 102 | 102 | $this->target->init(); |
@@ -71,8 +71,8 @@ discard block |
||
| 71 | 71 | $this->view->expects($this->once()) |
| 72 | 72 | ->method('partial') |
| 73 | 73 | ->with( |
| 74 | - dirname($this->viewModel->getTemplate()) . '/' . $this->helper->getPartial(), |
|
| 75 | - $this->callback(function (array $variables) { |
|
| 74 | + dirname($this->viewModel->getTemplate()).'/'.$this->helper->getPartial(), |
|
| 75 | + $this->callback(function(array $variables) { |
|
| 76 | 76 | return $variables['default'] && $variables['oneClick'] === []; |
| 77 | 77 | }) |
| 78 | 78 | ); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | $this->view->expects($this->once()) |
| 91 | 91 | ->method('partial') |
| 92 | - ->with(dirname($this->viewModel->getTemplate()) . '/' . $options['partial']); |
|
| 92 | + ->with(dirname($this->viewModel->getTemplate()).'/'.$options['partial']); |
|
| 93 | 93 | |
| 94 | 94 | $helper = $this->helper; |
| 95 | 95 | $helper($this->validData(), $options); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | ->method('partial') |
| 106 | 106 | ->with( |
| 107 | 107 | $this->anything(), |
| 108 | - $this->callback(function (array $variables) { |
|
| 108 | + $this->callback(function(array $variables) { |
|
| 109 | 109 | return $variables['default'] === null; |
| 110 | 110 | }) |
| 111 | 111 | ); |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | ->method('partial') |
| 125 | 125 | ->with( |
| 126 | 126 | $this->anything(), |
| 127 | - $this->callback(function (array $variables) use ($options) { |
|
| 127 | + $this->callback(function(array $variables) use ($options) { |
|
| 128 | 128 | return $variables['default']['label'] === $options['defaultLabel']; |
| 129 | 129 | }) |
| 130 | 130 | ); |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | ->method('partial') |
| 146 | 146 | ->with( |
| 147 | 147 | $this->anything(), |
| 148 | - $this->callback(function (array $variables) use ($options) { |
|
| 148 | + $this->callback(function(array $variables) use ($options) { |
|
| 149 | 149 | foreach ($variables['oneClick'] as $button) { |
| 150 | 150 | if ($button['label'] !== sprintf($options['oneClickLabel'], $button['network'])) { |
| 151 | 151 | return false; |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | ->method('url') |
| 173 | 173 | ->with( |
| 174 | 174 | 'lang/apply-one-click', |
| 175 | - $this->callback(function (array $variables) use ($options) { |
|
| 175 | + $this->callback(function(array $variables) use ($options) { |
|
| 176 | 176 | return $variables['immediately'] === $options['sendImmediately']; |
| 177 | 177 | }) |
| 178 | 178 | ); |
@@ -37,10 +37,10 @@ discard block |
||
| 37 | 37 | GeoSelectHydratorStrategy::class, |
| 38 | 38 | 'getTargetArgs', |
| 39 | 39 | '@testConstruction' => false, |
| 40 | - '@testInheritance' => [ 'as_reflection' => true ], |
|
| 40 | + '@testInheritance' => ['as_reflection' => true], |
|
| 41 | 41 | ]; |
| 42 | 42 | |
| 43 | - private $inheritance = [ StrategyInterface::class ]; |
|
| 43 | + private $inheritance = [StrategyInterface::class]; |
|
| 44 | 44 | |
| 45 | 45 | private function getTargetArgs() |
| 46 | 46 | { |
@@ -51,13 +51,13 @@ discard block |
||
| 51 | 51 | ; |
| 52 | 52 | $this->clientMock = $client; |
| 53 | 53 | |
| 54 | - return [ $client ]; |
|
| 54 | + return [$client]; |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | public function propertiesProvider() |
| 58 | 58 | { |
| 59 | 59 | $location = new Gshst_Location(); |
| 60 | - $assertInstance = function () { |
|
| 60 | + $assertInstance = function() { |
|
| 61 | 61 | $this->assertInstanceOf(Gshst_Location::class, $this->target->getLocationEntity()); |
| 62 | 62 | }; |
| 63 | 63 | return [ |
@@ -45,11 +45,11 @@ discard block |
||
| 45 | 45 | ], |
| 46 | 46 | ]; |
| 47 | 47 | |
| 48 | - private $inheritance = [ AbstractPaginationQuery::class ]; |
|
| 48 | + private $inheritance = [AbstractPaginationQuery::class]; |
|
| 49 | 49 | |
| 50 | 50 | private $attributes = [ |
| 51 | 51 | 'repositoryName' => 'Applications/Application', |
| 52 | - 'sortPropertiesMap' => [ 'date' => 'dateCreated.date' ] |
|
| 52 | + 'sortPropertiesMap' => ['date' => 'dateCreated.date'] |
|
| 53 | 53 | ]; |
| 54 | 54 | |
| 55 | 55 | private $authMock; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | private function getTargetArgs() |
| 58 | 58 | { |
| 59 | 59 | $this->authMock = $this->getMockBuilder(AuthenticationService::class)->disableOriginalConstructor()->getMock(); |
| 60 | - return [ $this->authMock ]; |
|
| 60 | + return [$this->authMock]; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | private function getTargetArgsForCreateQueryTest() |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $auth = $this |
| 69 | 69 | ->getMockBuilder(AuthenticationService::class) |
| 70 | 70 | ->disableOriginalConstructor() |
| 71 | - ->setMethods(['getUser' ]) |
|
| 71 | + ->setMethods(['getUser']) |
|
| 72 | 72 | ->getMock() |
| 73 | 73 | ; |
| 74 | 74 | |
@@ -120,8 +120,8 @@ discard block |
||
| 120 | 120 | $qb1->expects($this->exactly(2))->method('sort')->with(['dateCreated.date' => -1])->will($this->returnSelf()); |
| 121 | 121 | |
| 122 | 122 | $qb2->expects($this->exactly(6))->method('field')->withConsecutive( |
| 123 | - [ 'job'], |
|
| 124 | - [ 'readBy'], |
|
| 123 | + ['job'], |
|
| 124 | + ['readBy'], |
|
| 125 | 125 | ['keywords'], |
| 126 | 126 | ['permissions.view'], |
| 127 | 127 | ['isDraft'], |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | [$params3['status']] |
| 135 | 135 | )->will($this->returnSelf()); |
| 136 | 136 | $qb2->expects($this->once())->method('notEqual')->with('PqtUser'); |
| 137 | - $qb2->expects($this->once())->method('all')->with($this->callback(function ($arg) { |
|
| 137 | + $qb2->expects($this->once())->method('all')->with($this->callback(function($arg) { |
|
| 138 | 138 | return is_array($arg) && $arg[0] instanceof \MongoRegex; |
| 139 | 139 | })); |
| 140 | 140 | $qb2->expects($this->once())->method('sort')->with(['testSort' => 1]); |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | { |
| 153 | 153 | public function __call($method, $args) |
| 154 | 154 | { |
| 155 | - $this->callstack[] = [ $method, $args ]; |
|
| 155 | + $this->callstack[] = [$method, $args]; |
|
| 156 | 156 | |
| 157 | 157 | return $this; |
| 158 | 158 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | ], |
| 44 | 44 | ]; |
| 45 | 45 | |
| 46 | - private $inheritance = [ FactoryInterface::class ]; |
|
| 46 | + private $inheritance = [FactoryInterface::class]; |
|
| 47 | 47 | |
| 48 | 48 | public function testCreateService() |
| 49 | 49 | { |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | ->getMock(); |
| 74 | 74 | $translator->expects($this->once()) |
| 75 | 75 | ->method('translate') |
| 76 | - ->with($this->callback(function ($string) { |
|
| 76 | + ->with($this->callback(function($string) { |
|
| 77 | 77 | return is_string($string); |
| 78 | 78 | })) |
| 79 | 79 | ->willReturn($expected); |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | |
| 60 | 60 | public function testSetGetMessage() |
| 61 | 61 | { |
| 62 | - $message="this message"; |
|
| 62 | + $message = "this message"; |
|
| 63 | 63 | $this->target->setMessage($message); |
| 64 | 64 | $this->assertEquals($this->target->getMessage(), $message); |
| 65 | 65 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | public function testSetGetCv() |
| 138 | 138 | { |
| 139 | 139 | $cv = new Cv(); |
| 140 | - $education= new Education(); |
|
| 140 | + $education = new Education(); |
|
| 141 | 141 | $education->setDescription('test'); |
| 142 | 142 | $educations = new ArrayCollection(); |
| 143 | 143 | $educations->add($education); |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | */ |
| 319 | 319 | public function testSetGetKeywords() |
| 320 | 320 | { |
| 321 | - $input = array('Sehr',' geehrte',' Damen' ,'und' ,'Herren'); |
|
| 321 | + $input = array('Sehr', ' geehrte', ' Damen', 'und', 'Herren'); |
|
| 322 | 322 | $this->target->setKeywords($input); |
| 323 | 323 | $this->assertEquals($input, $this->target->getKeywords()); |
| 324 | 324 | $this->target->clearKeywords(); |
@@ -341,8 +341,8 @@ discard block |
||
| 341 | 341 | public function provideSetGetDraft() |
| 342 | 342 | { |
| 343 | 343 | return [ |
| 344 | - [true,true], |
|
| 345 | - [false,false] |
|
| 344 | + [true, true], |
|
| 345 | + [false, false] |
|
| 346 | 346 | ]; |
| 347 | 347 | } |
| 348 | 348 | |
@@ -372,11 +372,11 @@ discard block |
||
| 372 | 372 | public function providerSetGetApplicationStatus() |
| 373 | 373 | { |
| 374 | 374 | return [ |
| 375 | - [Status::REJECTED,new Status(Status::REJECTED)], |
|
| 376 | - [Status::INVITED,new Status(Status::INVITED)], |
|
| 377 | - [Status::INCOMING,new Status(Status::INCOMING)], |
|
| 378 | - [Status::CONFIRMED,new Status(Status::CONFIRMED)], |
|
| 379 | - [new Status(Status::CONFIRMED),new Status(Status::CONFIRMED)], |
|
| 375 | + [Status::REJECTED, new Status(Status::REJECTED)], |
|
| 376 | + [Status::INVITED, new Status(Status::INVITED)], |
|
| 377 | + [Status::INCOMING, new Status(Status::INCOMING)], |
|
| 378 | + [Status::CONFIRMED, new Status(Status::CONFIRMED)], |
|
| 379 | + [new Status(Status::CONFIRMED), new Status(Status::CONFIRMED)], |
|
| 380 | 380 | ]; |
| 381 | 381 | } |
| 382 | 382 | |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | return [ |
| 67 | 67 | [1, true], |
| 68 | 68 | [true, true], |
| 69 | - [false,false], |
|
| 69 | + [false, false], |
|
| 70 | 70 | ["1", true], |
| 71 | 71 | ]; |
| 72 | 72 | } |