@@ -35,7 +35,7 @@ |
||
| 35 | 35 | '@testConstructorCallsInheritWhenUserInfoIsPassed' => false, |
| 36 | 36 | ]; |
| 37 | 37 | |
| 38 | - private $inheritance = [ Info::class, InfoInterface::class ]; |
|
| 38 | + private $inheritance = [Info::class, InfoInterface::class]; |
|
| 39 | 39 | |
| 40 | 40 | |
| 41 | 41 | public function testConstructorCallsInheritWhenUserInfoIsPassed() |
@@ -83,11 +83,11 @@ |
||
| 83 | 83 | [ 'status', ['value' => new Status(), 'default' => new Status() ]], |
| 84 | 84 | [ 'status', ['value' => Status::NONPUBLIC, 'expect' => '@' . Status::class]], |
| 85 | 85 | [ 'status', ['value' => Status::PUBLIC_TO_ALL, 'ignore_getter' => true, |
| 86 | - 'pre' => function() use ($permissions2) { $this->target->setPermissions($permissions2); }] |
|
| 86 | + 'pre' => function() use ($permissions2) { $this->target->setPermissions($permissions2); }] |
|
| 87 | 87 | ], |
| 88 | 88 | [ 'status', ['value' => Status::NONPUBLIC, 'ignore_getter' => true, |
| 89 | - 'pre' => function() use ($permissions2) { $this->target->setPermissions($permissions2); }, |
|
| 90 | - 'post' => function() use ($permissions2) { $permissions2->__phpunit_verify(); }] |
|
| 89 | + 'pre' => function() use ($permissions2) { $this->target->setPermissions($permissions2); }, |
|
| 90 | + 'post' => function() use ($permissions2) { $permissions2->__phpunit_verify(); }] |
|
| 91 | 91 | ], |
| 92 | 92 | [ 'attachments', $defaultOptions], |
| 93 | 93 | [ 'user', ['value' => new User(), 'ignore_getter' => true, |
@@ -37,14 +37,14 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | private $target = Cv::class; |
| 39 | 39 | |
| 40 | - private $inheritance = [ AbstractIdentifiableEntity::class, CvInterface::class, DraftableEntityInterface::class ]; |
|
| 40 | + private $inheritance = [AbstractIdentifiableEntity::class, CvInterface::class, DraftableEntityInterface::class]; |
|
| 41 | 41 | |
| 42 | 42 | public function propertiesProvider() { |
| 43 | 43 | $coll = new ArrayCollection(); |
| 44 | 44 | $prefJob = new PreferredJob(); |
| 45 | - $defaultOptions = [ 'default' => $coll, 'value' => $coll ]; |
|
| 45 | + $defaultOptions = ['default' => $coll, 'value' => $coll]; |
|
| 46 | 46 | $indexedByOptions = function($prop) use ($coll) { |
| 47 | - return [ $prop, [ 'value' => $coll, 'getter_method' => 'get*IndexedById', 'expect' => '@' . IdentityWrapper::class]]; |
|
| 47 | + return [$prop, ['value' => $coll, 'getter_method' => 'get*IndexedById', 'expect' => '@'.IdentityWrapper::class]]; |
|
| 48 | 48 | }; |
| 49 | 49 | $permissions = $this |
| 50 | 50 | ->getMockBuilder(Permissions::class) |
@@ -66,36 +66,36 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | |
| 68 | 68 | return [ |
| 69 | - [ 'educations', $defaultOptions], |
|
| 70 | - [ 'employments',$defaultOptions], |
|
| 71 | - [ 'skills', $defaultOptions], |
|
| 72 | - [ 'languageSkills', $defaultOptions], |
|
| 73 | - [ 'nativeLanguages', ['default' => [], 'value' => []]], |
|
| 74 | - [ 'preferredJob', [ 'default' => $prefJob, 'value' => $prefJob]], |
|
| 75 | - [ 'user', new User() ], |
|
| 76 | - [ 'contact', new Contact()], |
|
| 77 | - [ 'contact', ['value' => new Info(), 'expect' => '@' . Contact::class ]], |
|
| 69 | + ['educations', $defaultOptions], |
|
| 70 | + ['employments', $defaultOptions], |
|
| 71 | + ['skills', $defaultOptions], |
|
| 72 | + ['languageSkills', $defaultOptions], |
|
| 73 | + ['nativeLanguages', ['default' => [], 'value' => []]], |
|
| 74 | + ['preferredJob', ['default' => $prefJob, 'value' => $prefJob]], |
|
| 75 | + ['user', new User()], |
|
| 76 | + ['contact', new Contact()], |
|
| 77 | + ['contact', ['value' => new Info(), 'expect' => '@'.Contact::class]], |
|
| 78 | 78 | $indexedByOptions('languageSkills'), |
| 79 | 79 | $indexedByOptions('employments'), |
| 80 | 80 | $indexedByOptions('educations'), |
| 81 | 81 | $indexedByOptions('skills'), |
| 82 | - [ 'isDraft', [ 'value' => false, 'getter_method' => '*']], |
|
| 83 | - [ 'status', ['value' => new Status(), 'default' => new Status() ]], |
|
| 84 | - [ 'status', ['value' => Status::NONPUBLIC, 'expect' => '@' . Status::class]], |
|
| 85 | - [ 'status', ['value' => Status::PUBLIC_TO_ALL, 'ignore_getter' => true, |
|
| 82 | + ['isDraft', ['value' => false, 'getter_method' => '*']], |
|
| 83 | + ['status', ['value' => new Status(), 'default' => new Status()]], |
|
| 84 | + ['status', ['value' => Status::NONPUBLIC, 'expect' => '@'.Status::class]], |
|
| 85 | + ['status', ['value' => Status::PUBLIC_TO_ALL, 'ignore_getter' => true, |
|
| 86 | 86 | 'pre' => function() use ($permissions2) { $this->target->setPermissions($permissions2); }] |
| 87 | 87 | ], |
| 88 | - [ 'status', ['value' => Status::NONPUBLIC, 'ignore_getter' => true, |
|
| 88 | + ['status', ['value' => Status::NONPUBLIC, 'ignore_getter' => true, |
|
| 89 | 89 | 'pre' => function() use ($permissions2) { $this->target->setPermissions($permissions2); }, |
| 90 | 90 | 'post' => function() use ($permissions2) { $permissions2->__phpunit_verify(); }] |
| 91 | 91 | ], |
| 92 | - [ 'attachments', $defaultOptions], |
|
| 93 | - [ 'user', ['value' => new User(), 'ignore_getter' => true, |
|
| 92 | + ['attachments', $defaultOptions], |
|
| 93 | + ['user', ['value' => new User(), 'ignore_getter' => true, |
|
| 94 | 94 | 'pre' => function() use ($permissions) { $this->target->setUser(new User())->setPermissions($permissions); }, |
| 95 | 95 | 'post' => function() use ($permissions) { $permissions->__phpunit_verify(); } |
| 96 | 96 | ]], |
| 97 | 97 | |
| 98 | - [ 'resourceId', ['value' => 'Entity/Cv', 'ignore_setter' => true ]], |
|
| 98 | + ['resourceId', ['value' => 'Entity/Cv', 'ignore_setter' => true]], |
|
| 99 | 99 | ]; |
| 100 | 100 | } |
| 101 | 101 | } |
@@ -32,10 +32,10 @@ |
||
| 32 | 32 | |
| 33 | 33 | private $target = NativeLanguage::class; |
| 34 | 34 | |
| 35 | - private $inheritance = [ 'Core\Entity\AbstractEntity' ]; |
|
| 35 | + private $inheritance = ['Core\Entity\AbstractEntity']; |
|
| 36 | 36 | |
| 37 | 37 | private $properties = [ |
| 38 | - [ 'language', 'Some Language' ], |
|
| 39 | - [ 'language', [ '@value' => NativeLanguageTestEnglish::class, 'expect' => 'English' ]] |
|
| 38 | + ['language', 'Some Language'], |
|
| 39 | + ['language', ['@value' => NativeLanguageTestEnglish::class, 'expect' => 'English']] |
|
| 40 | 40 | ]; |
| 41 | 41 | } |
@@ -27,16 +27,16 @@ |
||
| 27 | 27 | ContactImage::class, |
| 28 | 28 | ]; |
| 29 | 29 | |
| 30 | - private $inheritance = [ FileEntity::class ]; |
|
| 30 | + private $inheritance = [FileEntity::class]; |
|
| 31 | 31 | |
| 32 | 32 | public function propertiesProvider() |
| 33 | 33 | { |
| 34 | 34 | return [ |
| 35 | - [ 'contact', '@' . Contact::class ], |
|
| 36 | - [ 'uri', [ |
|
| 35 | + ['contact', '@'.Contact::class], |
|
| 36 | + ['uri', [ |
|
| 37 | 37 | 'pre' => function() { $this->target->setId('some-id')->setName('some-name'); }, |
| 38 | 38 | 'ignore_setter' => true, |
| 39 | - 'value' => '/file/Cv.ContactImage/some-id/' . urlencode('some-name'), |
|
| 39 | + 'value' => '/file/Cv.ContactImage/some-id/'.urlencode('some-name'), |
|
| 40 | 40 | ]], |
| 41 | 41 | ]; |
| 42 | 42 | } |
@@ -28,19 +28,19 @@ |
||
| 28 | 28 | |
| 29 | 29 | protected $target = Skill::class; |
| 30 | 30 | |
| 31 | - protected $inheritance = [ '\Core\Entity\AbstractIdentifiableEntity' ]; |
|
| 31 | + protected $inheritance = ['\Core\Entity\AbstractIdentifiableEntity']; |
|
| 32 | 32 | |
| 33 | 33 | public function propertiesProvider() |
| 34 | 34 | { |
| 35 | 35 | $options = [ |
| 36 | - 'default' => '@' . ArrayCollection::class, |
|
| 36 | + 'default' => '@'.ArrayCollection::class, |
|
| 37 | 37 | 'value' => new ArrayCollection(), |
| 38 | 38 | ]; |
| 39 | 39 | |
| 40 | 40 | return [ |
| 41 | - [ 'nativeLanguages', $options ], |
|
| 42 | - [ 'languageSkills', $options ], |
|
| 43 | - [ 'computerSkills', $options ], |
|
| 41 | + ['nativeLanguages', $options], |
|
| 42 | + ['languageSkills', $options], |
|
| 43 | + ['computerSkills', $options], |
|
| 44 | 44 | ]; |
| 45 | 45 | } |
| 46 | 46 | } |
@@ -29,14 +29,14 @@ |
||
| 29 | 29 | |
| 30 | 30 | private $target = ModuleOptions::class; |
| 31 | 31 | |
| 32 | - private $inheritance = [ AbstractOptions::class ]; |
|
| 32 | + private $inheritance = [AbstractOptions::class]; |
|
| 33 | 33 | |
| 34 | 34 | private $properties = [ |
| 35 | - ['attachmentsMaxSize', ['value' => '1234', 'default' => 5000000] ], |
|
| 35 | + ['attachmentsMaxSize', ['value' => '1234', 'default' => 5000000]], |
|
| 36 | 36 | ['attachmentsMimeType', [ |
| 37 | 37 | 'value' => ['mime/type'], |
| 38 | 38 | 'default' => [ |
| 39 | - 'image','applications/pdf', |
|
| 39 | + 'image', 'applications/pdf', |
|
| 40 | 40 | 'application/x-pdf', |
| 41 | 41 | 'application/acrobat', |
| 42 | 42 | 'applications/vnd.pdf', |
@@ -152,17 +152,17 @@ |
||
| 152 | 152 | 'mock' => [ |
| 153 | 153 | 'add', |
| 154 | 154 | 'setName' => ['with' => 'nativeLanguages', 'count' => 1, 'return' => '__self__'], |
| 155 | - 'setHydrator' => ['@with' => ['isInstanceOf', EntityHydrator::class ], 'count' => 1, 'return' => '__self__'], |
|
| 156 | - 'setObject' => ['@with' => ['isInstanceOf', NativeLanguage::class ], 'count' => 1, 'return' => '__self__'], |
|
| 155 | + 'setHydrator' => ['@with' => ['isInstanceOf', EntityHydrator::class], 'count' => 1, 'return' => '__self__'], |
|
| 156 | + 'setObject' => ['@with' => ['isInstanceOf', NativeLanguage::class], 'count' => 1, 'return' => '__self__'], |
|
| 157 | 157 | 'setLabel' => ['with' => 'Native Language', 'count' => 1] |
| 158 | 158 | ], |
| 159 | 159 | 'args' => false, |
| 160 | 160 | ], |
| 161 | 161 | ]; |
| 162 | 162 | |
| 163 | - private $inheritance = [ Fieldset::class, EmptySummaryAwareInterface::class ]; |
|
| 163 | + private $inheritance = [Fieldset::class, EmptySummaryAwareInterface::class]; |
|
| 164 | 164 | |
| 165 | - private $traits = [ EmptySummaryAwareTrait::class ]; |
|
| 165 | + private $traits = [EmptySummaryAwareTrait::class]; |
|
| 166 | 166 | |
| 167 | 167 | private function getDefaultAttributes() |
| 168 | 168 | { |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | ], |
| 46 | 46 | ]; |
| 47 | 47 | |
| 48 | - private $inheritance = [ SummaryForm::class ]; |
|
| 48 | + private $inheritance = [SummaryForm::class]; |
|
| 49 | 49 | |
| 50 | 50 | private $attributes = [ |
| 51 | 51 | 'baseFieldset' => 'EmploymentFieldset', |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | ], |
| 46 | 46 | ]; |
| 47 | 47 | |
| 48 | - private $inheritance = [ SummaryForm::class ]; |
|
| 48 | + private $inheritance = [SummaryForm::class]; |
|
| 49 | 49 | |
| 50 | 50 | private $attributes = [ |
| 51 | 51 | 'baseFieldset' => 'EducationFieldset', |