| @@ -169,7 +169,7 @@ | ||
| 169 | 169 | |
| 170 | 170 | |
| 171 | 171 | $target = new EmployeeInvitationFactory(); | 
| 172 | - $mail = $target->__invoke($services,'irrelevant',$options); | |
| 172 | + $mail = $target->__invoke($services, 'irrelevant', $options); | |
| 173 | 173 | |
| 174 | 174 | |
| 175 | 175 | $vars = $mail->getVariables()->getArrayCopy(); | 
| @@ -60,74 +60,74 @@ discard block | ||
| 60 | 60 | $parent = new Organization(); | 
| 61 | 61 | $permissions = $this->createMock(Permissions::class); | 
| 62 | 62 | return [ | 
| 63 | - [ 'externalId', '1234' ], | |
| 64 | - [ 'name', [ 'value'=> '', 'ignore_setter' => true] ], | |
| 65 | - [ 'name', [ 'pre' => 'setupGetName', 'value' => 'Test', 'ignore_setter' => true] ], | |
| 66 | - [ 'organizationName' , [ | |
| 67 | - '@value' => [ '\Organizations\Entity\OrganizationName', [ 'Test' ] ], | |
| 63 | + ['externalId', '1234'], | |
| 64 | + ['name', ['value'=> '', 'ignore_setter' => true]], | |
| 65 | + ['name', ['pre' => 'setupGetName', 'value' => 'Test', 'ignore_setter' => true]], | |
| 66 | + ['organizationName', [ | |
| 67 | + '@value' => ['\Organizations\Entity\OrganizationName', ['Test']], | |
| 68 | 68 | 'post' => 'organizationNamePostAsserts' | 
| 69 | 69 | ]], | 
| 70 | - [ 'organizationName', [ | |
| 70 | + ['organizationName', [ | |
| 71 | 71 | 'pre' => 'setupOrganizationName', | 
| 72 | - '@value' => [ '\Organizations\Entity\OrganizationName', [ 'TestNew' ] ], | |
| 72 | + '@value' => ['\Organizations\Entity\OrganizationName', ['TestNew']], | |
| 73 | 73 | 'post' => 'assertOrganizationNameCounter' | 
| 74 | 74 | ]], | 
| 75 | - [ 'permissions',[ | |
| 75 | + ['permissions', [ | |
| 76 | 76 | 'value' => $permissions | 
| 77 | 77 | ]], | 
| 78 | - [ 'image',[ | |
| 78 | + ['image', [ | |
| 79 | 79 | 'value' => new OrganizationImage() | 
| 80 | 80 | ]], | 
| 81 | - [ 'images',[ | |
| 81 | + ['images', [ | |
| 82 | 82 | 'value' => new ImageSet(), | 
| 83 | 83 | ]], | 
| 84 | - [ 'isDraft',[ | |
| 84 | + ['isDraft', [ | |
| 85 | 85 | 'default' => false, | 
| 86 | 86 | 'value' => true, | 
| 87 | 87 | 'getter_method' => 'isDraft' | 
| 88 | 88 | ]], | 
| 89 | - [ 'contact',[ | |
| 89 | + ['contact', [ | |
| 90 | 90 | 'value' => new OrganizationContact() | 
| 91 | 91 | ]], | 
| 92 | - [ 'description',[ | |
| 92 | + ['description', [ | |
| 93 | 93 | 'default' => null, | 
| 94 | 94 | 'value' => 'Some Description' | 
| 95 | 95 | ]], | 
| 96 | - [ 'parent',[ | |
| 96 | + ['parent', [ | |
| 97 | 97 | 'default' => null, | 
| 98 | 98 | 'value' => $parent, | 
| 99 | 99 | ]], | 
| 100 | - [ 'hiringOrganizations',[ | |
| 100 | + ['hiringOrganizations', [ | |
| 101 | 101 | 'default' => null, | 
| 102 | 102 | ]], | 
| 103 | 103 | |
| 104 | - [ 'employees',[ | |
| 104 | + ['employees', [ | |
| 105 | 105 | '@default' => ArrayCollection::class, | 
| 106 | 106 | 'value' => new ArrayCollection() | 
| 107 | 107 | ]], | 
| 108 | 108 | |
| 109 | - [ 'jobs',[ | |
| 109 | + ['jobs', [ | |
| 110 | 110 | 'default' => null, | 
| 111 | 111 | ]], | 
| 112 | 112 | |
| 113 | - [ 'user',[ | |
| 113 | + ['user', [ | |
| 114 | 114 | 'value' => new User() | 
| 115 | 115 | ]], | 
| 116 | 116 | |
| 117 | - [ 'template',[ | |
| 117 | + ['template', [ | |
| 118 | 118 | 'value' => new Template(), | 
| 119 | 119 | ]], | 
| 120 | 120 | |
| 121 | - [ 'workflowSettings',[ | |
| 121 | + ['workflowSettings', [ | |
| 122 | 122 | 'value' => new WorkflowSettings(), | 
| 123 | 123 | ]], | 
| 124 | 124 | |
| 125 | - [ 'profileSetting',[ | |
| 125 | + ['profileSetting', [ | |
| 126 | 126 | 'value' => Organization::PROFILE_ALWAYS_ENABLE, | 
| 127 | 127 | 'default' => null, | 
| 128 | 128 | ]], | 
| 129 | 129 | |
| 130 | - [ 'hydrator', [ | |
| 130 | + ['hydrator', [ | |
| 131 | 131 | '@default' => EntityHydrator::class | 
| 132 | 132 | ]] | 
| 133 | 133 | |
| @@ -176,8 +176,8 @@ discard block | ||
| 176 | 176 | $organization->setEmployees($employees); | 
| 177 | 177 | |
| 178 | 178 | $organization->getEmployee($user); | 
| 179 | - $this->assertEquals($employee,$organization->getEmployee($user)); | |
| 180 | - $this->assertEquals($employee,$organization->getEmployee($user->getId())); | |
| 179 | + $this->assertEquals($employee, $organization->getEmployee($user)); | |
| 180 | + $this->assertEquals($employee, $organization->getEmployee($user->getId())); | |
| 181 | 181 |          $this->assertNull($organization->getEmployee('foobar')); | 
| 182 | 182 | $this->assertEquals( | 
| 183 | 183 | [$employee], | 
| @@ -186,7 +186,7 @@ discard block | ||
| 186 | 186 | ->toArray() | 
| 187 | 187 | ); | 
| 188 | 188 | |
| 189 | - $this->assertEquals(1,$organization->getEmployees()->count()); | |
| 189 | + $this->assertEquals(1, $organization->getEmployees()->count()); | |
| 190 | 190 | $organization->setParent($parent); | 
| 191 | 191 | $this->assertEquals( | 
| 192 | 192 | 0, | 
| @@ -199,12 +199,12 @@ discard block | ||
| 199 | 199 |      { | 
| 200 | 200 | $image = new OrganizationImage(); | 
| 201 | 201 | $images = new ImageSet(); | 
| 202 | - $images->set(ImageSet::ORIGINAL,$image); | |
| 202 | + $images->set(ImageSet::ORIGINAL, $image); | |
| 203 | 203 | |
| 204 | 204 | $organization = new Organization(); | 
| 205 | 205 | $organization->setImages($images); | 
| 206 | 206 | $organization->removeImages(); | 
| 207 | - $this->assertNotEquals($images,$organization->getImages()); | |
| 207 | + $this->assertNotEquals($images, $organization->getImages()); | |
| 208 | 208 | $this->assertNull($organization->getImages()->get(ImageSet::ORIGINAL)); | 
| 209 | 209 | } | 
| 210 | 210 | |
| @@ -299,7 +299,7 @@ discard block | ||
| 299 | 299 | $permissions = $this->createMock(Permissions::class); | 
| 300 | 300 | $permissions->expects($this->once()) | 
| 301 | 301 |              ->method('grant') | 
| 302 | - ->with($user,PermissionsInterface::PERMISSION_CHANGE,false) | |
| 302 | + ->with($user, PermissionsInterface::PERMISSION_CHANGE, false) | |
| 303 | 303 | ; | 
| 304 | 304 | |
| 305 | 305 | $organization = new Organization(); | 
| @@ -114,7 +114,7 @@ discard block | ||
| 114 | 114 | $args = array($args); | 
| 115 | 115 | } | 
| 116 | 116 | |
| 117 | -        for ($i=0,$c=count($func); $i<$c; $i+=1) { | |
| 117 | +        for ($i = 0, $c = count($func); $i < $c; $i += 1) { | |
| 118 | 118 | $f = $func[$i]; | 
| 119 | 119 | $a = $args[$i]; | 
| 120 | 120 | |
| @@ -141,7 +141,7 @@ discard block | ||
| 141 | 141 | $func = array($func); $args = array($args); $expected = array($expected); | 
| 142 | 142 | } | 
| 143 | 143 | |
| 144 | -        for ($i=0, $c=count($func); $i<$c; $i+=1) { | |
| 144 | +        for ($i = 0, $c = count($func); $i < $c; $i += 1) { | |
| 145 | 145 | $f = $func[$i]; | 
| 146 | 146 | $a = $args[$i]; | 
| 147 | 147 | $e = $expected[$i]; | 
| @@ -171,7 +171,7 @@ discard block | ||
| 171 | 171 | $perms = new Permissions(); | 
| 172 | 172 | $contact = new OrganizationContact(); | 
| 173 | 173 | $image = new OrganizationImage(); | 
| 174 | - $externalId='myReference'; | |
| 174 | + $externalId = 'myReference'; | |
| 175 | 175 | $template = new Template(); | 
| 176 | 176 |          $template->setLabelBenefits('These are your Benefits'); | 
| 177 | 177 | $workflowSettings = new WorkflowSettings(); | 
| @@ -54,14 +54,14 @@ | ||
| 54 | 54 | |
| 55 | 55 | public function testGetUriWithAndWithoutFilename() | 
| 56 | 56 |      { | 
| 57 | - $filename="My File.png"; | |
| 57 | + $filename = "My File.png"; | |
| 58 | 58 | $this->target->setName($filename); | 
| 59 | 59 | $this->assertSame($this->target->getUri(), '/file/Organizations.OrganizationImage/'.$this->target->getId().'/'.urlencode($this->target->getName())); | 
| 60 | 60 | $this->target->setName(null); | 
| 61 | 61 | $this->assertSame($this->target->getUri(), '/file/Organizations.OrganizationImage/'.$this->target->getId()); | 
| 62 | 62 | } | 
| 63 | 63 | |
| 64 | -    public function testSetGetOrganization(){ | |
| 64 | +    public function testSetGetOrganization() { | |
| 65 | 65 | $organization = new Organization(); | 
| 66 | 66 | $this->target->setOrganization($organization); | 
| 67 | 67 | $this->assertSame($this->target->getOrganization(), $organization); | 
| @@ -29,7 +29,7 @@ discard block | ||
| 29 | 29 | */ | 
| 30 | 30 | protected $target; | 
| 31 | 31 | |
| 32 | -    public function setUp(){ | |
| 32 | +    public function setUp() { | |
| 33 | 33 | $this->target = new OrganizationsDescriptionFieldset(); | 
| 34 | 34 | $this->target->init(); | 
| 35 | 35 | } | 
| @@ -39,16 +39,16 @@ discard block | ||
| 39 | 39 |          $this->assertInstanceOf('Zend\Form\Fieldset', $this->target); | 
| 40 | 40 | } | 
| 41 | 41 | |
| 42 | -    public function testNameFormFields(){ | |
| 43 | - $this->assertSame($this->target->getName(),"organization-description"); | |
| 42 | +    public function testNameFormFields() { | |
| 43 | + $this->assertSame($this->target->getName(), "organization-description"); | |
| 44 | 44 |          $this->assertTrue($this->target->has('description')); | 
| 45 | 45 | } | 
| 46 | 46 | |
| 47 | -    public function testGetInputFilterSpec(){ | |
| 48 | - $this->assertSame($this->target->getInputFilterSpecification(),[]); | |
| 47 | +    public function testGetInputFilterSpec() { | |
| 48 | + $this->assertSame($this->target->getInputFilterSpecification(), []); | |
| 49 | 49 | } | 
| 50 | 50 | |
| 51 | -    public function testGetHydrator(){ | |
| 51 | +    public function testGetHydrator() { | |
| 52 | 52 | $this->assertEquals($this->target->getHydrator(), new EntityHydrator()); | 
| 53 | 53 | } | 
| 54 | 54 | |
| @@ -36,11 +36,11 @@ | ||
| 36 | 36 |          $this->assertInstanceOf('Organizations\Form\Organizations', $this->target); | 
| 37 | 37 | } | 
| 38 | 38 | |
| 39 | -    public function testName(){ | |
| 40 | - $this->assertSame($this->target->getName(),'organization-form'); | |
| 39 | +    public function testName() { | |
| 40 | + $this->assertSame($this->target->getName(), 'organization-form'); | |
| 41 | 41 | } | 
| 42 | 42 | |
| 43 | 43 |      public function testNumberOfField() { | 
| 44 | - $this->assertSame($this->target->count(),7); | |
| 44 | + $this->assertSame($this->target->count(), 7); | |
| 45 | 45 | } | 
| 46 | 46 | } | 
| @@ -36,7 +36,7 @@ discard block | ||
| 36 | 36 | |
| 37 | 37 | public function testNameFormFields() | 
| 38 | 38 |      { | 
| 39 | -        $this->assertEquals('profile-setting',$this->target->getName()); | |
| 39 | +        $this->assertEquals('profile-setting', $this->target->getName()); | |
| 40 | 40 |          $this->assertTrue($this->target->has('profileSetting')); | 
| 41 | 41 | } | 
| 42 | 42 | |
| @@ -50,7 +50,7 @@ discard block | ||
| 50 | 50 | $this->assertTrue($this->target->allowObjectBinding(new Organization())); | 
| 51 | 51 | } | 
| 52 | 52 | |
| 53 | -    public function testGetHydrator(){ | |
| 53 | +    public function testGetHydrator() { | |
| 54 | 54 | $this->assertEquals($this->target->getHydrator(), new EntityHydrator()); | 
| 55 | 55 | } | 
| 56 | 56 | } | 
| @@ -30,7 +30,7 @@ discard block | ||
| 30 | 30 | */ | 
| 31 | 31 | protected $target; | 
| 32 | 32 | |
| 33 | -    public function setUp(){ | |
| 33 | +    public function setUp() { | |
| 34 | 34 | $this->target = new OrganizationsContactFieldset(); | 
| 35 | 35 | $this->target->init(); | 
| 36 | 36 | } | 
| @@ -40,8 +40,8 @@ discard block | ||
| 40 | 40 |          $this->assertInstanceOf('Zend\Form\Fieldset', $this->target); | 
| 41 | 41 | } | 
| 42 | 42 | |
| 43 | -    public function testNameFormFields(){ | |
| 44 | - $this->assertSame($this->target->getName(),"contact"); | |
| 43 | +    public function testNameFormFields() { | |
| 44 | + $this->assertSame($this->target->getName(), "contact"); | |
| 45 | 45 |          $this->assertTrue($this->target->has('fax')); | 
| 46 | 46 |          $this->assertTrue($this->target->has('phone')); | 
| 47 | 47 |          $this->assertTrue($this->target->has('city')); | 
| @@ -50,15 +50,15 @@ discard block | ||
| 50 | 50 |          $this->assertTrue($this->target->has('street')); | 
| 51 | 51 | } | 
| 52 | 52 | |
| 53 | -    public function testAllowObjectBinding(){ | |
| 54 | - $this->assertSame($this->target->allowObjectBinding(new OrganizationContact),true); | |
| 53 | +    public function testAllowObjectBinding() { | |
| 54 | + $this->assertSame($this->target->allowObjectBinding(new OrganizationContact), true); | |
| 55 | 55 | } | 
| 56 | 56 | |
| 57 | -    public function testGetInputFilterSpec(){ | |
| 58 | - $this->assertSame($this->target->getInputFilterSpecification(),[]); | |
| 57 | +    public function testGetInputFilterSpec() { | |
| 58 | + $this->assertSame($this->target->getInputFilterSpecification(), []); | |
| 59 | 59 | } | 
| 60 | 60 | |
| 61 | -    public function testGetHydrator(){ | |
| 61 | +    public function testGetHydrator() { | |
| 62 | 62 | $this->assertEquals($this->target->getHydrator(), new EntityHydrator()); | 
| 63 | 63 | } | 
| 64 | 64 | |
| @@ -39,8 +39,8 @@ discard block | ||
| 39 | 39 | $container->expects($this->any()) | 
| 40 | 40 |              ->method('get') | 
| 41 | 41 | ->willReturnMap([ | 
| 42 | - ['FilterManager',$filterManager], | |
| 43 | - ['repositories',$repositories] | |
| 42 | + ['FilterManager', $filterManager], | |
| 43 | + ['repositories', $repositories] | |
| 44 | 44 | ]) | 
| 45 | 45 | ; | 
| 46 | 46 | |
| @@ -60,8 +60,8 @@ discard block | ||
| 60 | 60 | ; | 
| 61 | 61 | |
| 62 | 62 | $target = new ListJobPaginatorFactory(); | 
| 63 | - $service = $target($container,'some-name',array()); | |
| 63 | + $service = $target($container, 'some-name', array()); | |
| 64 | 64 | |
| 65 | - $this->assertInstanceOf(Paginator::class,$service); | |
| 65 | + $this->assertInstanceOf(Paginator::class, $service); | |
| 66 | 66 | } | 
| 67 | 67 | } |