@@ -43,7 +43,7 @@ |
||
43 | 43 | 'mock' => ['setName' => ['with' => 'cv-form', 'count' => 1], 'setForms'], |
44 | 44 | ], |
45 | 45 | '@testSetsIdParamWhenEntityIsSet' => [ |
46 | - 'mock' => [ 'setParam' ], |
|
46 | + 'mock' => ['setParam'], |
|
47 | 47 | ], |
48 | 48 | ]; |
49 | 49 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | 'mock' => [ |
37 | 37 | 'setName' => ['with' => 'skill', 'count' => 1, 'return' => '__self__'], |
38 | 38 | 'setLabel' => ['with' => 'Languages', 'count' => 1, 'return' => '__self__'], |
39 | - 'setObject' => [ '@with' => ['isInstanceOf', Skill::class], 'count' => 1], |
|
39 | + 'setObject' => ['@with' => ['isInstanceOf', Skill::class], 'count' => 1], |
|
40 | 40 | 'add' |
41 | 41 | ], |
42 | 42 | ], |
@@ -39,15 +39,15 @@ discard block |
||
39 | 39 | 'mock' => [ |
40 | 40 | 'add', |
41 | 41 | 'setName' => ['with' => 'language', 'count' => 1, 'return' => '__self__'], |
42 | - 'setHydrator' => ['@with' => ['isInstanceOf', EntityHydrator::class ], 'count' => 1, 'return' => '__self__'], |
|
43 | - 'setObject' => ['@with' => ['isInstanceOf', Language::class ], 'count' => 1, 'return' => '__self__'], |
|
42 | + 'setHydrator' => ['@with' => ['isInstanceOf', EntityHydrator::class], 'count' => 1, 'return' => '__self__'], |
|
43 | + 'setObject' => ['@with' => ['isInstanceOf', Language::class], 'count' => 1, 'return' => '__self__'], |
|
44 | 44 | 'setLabel' => ['with' => 'Language', 'count' => 1] |
45 | 45 | ], |
46 | 46 | 'args' => false, |
47 | 47 | ], |
48 | 48 | ]; |
49 | 49 | |
50 | - private $inheritance = [ Fieldset::class ]; |
|
50 | + private $inheritance = [Fieldset::class]; |
|
51 | 51 | |
52 | 52 | public function testInitializesItself() |
53 | 53 | { |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | $callCount = count($add); |
106 | 106 | |
107 | - $arrayContainsPairs = function ($expected, $actual) use (&$arrayContainsPairs) { |
|
107 | + $arrayContainsPairs = function($expected, $actual) use (&$arrayContainsPairs) { |
|
108 | 108 | foreach ($expected as $key => $value) { |
109 | 109 | if (!array_key_exists($key, $actual)) { |
110 | 110 | return false; |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | }; |
120 | 120 | |
121 | 121 | |
122 | - $addArgValidator = function ($arg) use ($add, $callCount, $arrayContainsPairs) { |
|
122 | + $addArgValidator = function($arg) use ($add, $callCount, $arrayContainsPairs) { |
|
123 | 123 | static $count = 0; |
124 | 124 | |
125 | 125 | /* PPHUnit calls this callback again after all invokations are made |
@@ -65,41 +65,41 @@ |
||
65 | 65 | ['cv-list-filter'] |
66 | 66 | ); |
67 | 67 | $add1 = [ |
68 | - 'name' => 'l', |
|
69 | - 'type' => 'LocationSelect', |
|
70 | - 'options' => [ |
|
71 | - 'label' => 'Location', |
|
72 | - 'span' => 3, |
|
73 | - 'location_entity' => \Cv\Entity\Location::class, |
|
74 | - ], |
|
75 | - 'attributes' => [ |
|
76 | - 'data-width' => '100%', |
|
77 | - ], |
|
78 | - ]; |
|
68 | + 'name' => 'l', |
|
69 | + 'type' => 'LocationSelect', |
|
70 | + 'options' => [ |
|
71 | + 'label' => 'Location', |
|
72 | + 'span' => 3, |
|
73 | + 'location_entity' => \Cv\Entity\Location::class, |
|
74 | + ], |
|
75 | + 'attributes' => [ |
|
76 | + 'data-width' => '100%', |
|
77 | + ], |
|
78 | + ]; |
|
79 | 79 | |
80 | 80 | $add2 = [ |
81 | - 'name' => 'd', |
|
82 | - 'type' => 'Core\Form\Element\Select', |
|
83 | - 'options' => [ |
|
84 | - 'label' => /*@translate*/ 'Distance', |
|
85 | - 'value_options' => [ |
|
86 | - '5' => '5 km', |
|
87 | - '10' => '10 km', |
|
88 | - '20' => '20 km', |
|
89 | - '50' => '50 km', |
|
90 | - '100' => '100 km' |
|
91 | - ], |
|
92 | - 'span' => 4, |
|
81 | + 'name' => 'd', |
|
82 | + 'type' => 'Core\Form\Element\Select', |
|
83 | + 'options' => [ |
|
84 | + 'label' => /*@translate*/ 'Distance', |
|
85 | + 'value_options' => [ |
|
86 | + '5' => '5 km', |
|
87 | + '10' => '10 km', |
|
88 | + '20' => '20 km', |
|
89 | + '50' => '50 km', |
|
90 | + '100' => '100 km' |
|
91 | + ], |
|
92 | + 'span' => 4, |
|
93 | 93 | |
94 | - ], |
|
95 | - 'attributes' => [ |
|
96 | - 'value' => '10', |
|
97 | - 'data-searchbox' => -1, |
|
98 | - 'data-allowclear' => 'false', |
|
99 | - 'data-placeholder' => 'Distance', |
|
100 | - 'data-width' => '100%', |
|
101 | - ] |
|
102 | - ]; |
|
94 | + ], |
|
95 | + 'attributes' => [ |
|
96 | + 'value' => '10', |
|
97 | + 'data-searchbox' => -1, |
|
98 | + 'data-allowclear' => 'false', |
|
99 | + 'data-placeholder' => 'Distance', |
|
100 | + 'data-width' => '100%', |
|
101 | + ] |
|
102 | + ]; |
|
103 | 103 | |
104 | 104 | $this->target->expects($this->exactly(2))->method('add') |
105 | 105 | ->withConsecutive( |
@@ -48,7 +48,7 @@ |
||
48 | 48 | ], |
49 | 49 | ]; |
50 | 50 | |
51 | - private $inheritance = [ \Core\Form\SearchForm::class ]; |
|
51 | + private $inheritance = [\Core\Form\SearchForm::class]; |
|
52 | 52 | |
53 | 53 | public function testInitializesItself() |
54 | 54 | { |
@@ -35,17 +35,17 @@ |
||
35 | 35 | private $target = [ |
36 | 36 | Employment::class, |
37 | 37 | '@testSetData' => [ |
38 | - 'mock' => [ 'add', 'populate' /* is called in parent method */ ] |
|
38 | + 'mock' => ['add', 'populate' /* is called in parent method */] |
|
39 | 39 | ] |
40 | 40 | ]; |
41 | 41 | |
42 | - private $inheritance = [ InputFilter::class ]; |
|
42 | + private $inheritance = [InputFilter::class]; |
|
43 | 43 | |
44 | 44 | public function provideFilterData() |
45 | 45 | { |
46 | 46 | return [ |
47 | - [ ['currentIndicator' => true ] ], |
|
48 | - [ ['currentIndicator' => false ] ] |
|
47 | + [['currentIndicator' => true]], |
|
48 | + [['currentIndicator' => false]] |
|
49 | 49 | ]; |
50 | 50 | } |
51 | 51 |
@@ -35,17 +35,17 @@ |
||
35 | 35 | private $target = [ |
36 | 36 | Education::class, |
37 | 37 | '@testSetData' => [ |
38 | - 'mock' => [ 'add', 'populate' /* is called in parent method */ ] |
|
38 | + 'mock' => ['add', 'populate' /* is called in parent method */] |
|
39 | 39 | ] |
40 | 40 | ]; |
41 | 41 | |
42 | - private $inheritance = [ InputFilter::class ]; |
|
42 | + private $inheritance = [InputFilter::class]; |
|
43 | 43 | |
44 | 44 | public function provideFilterData() |
45 | 45 | { |
46 | 46 | return [ |
47 | - [ ['currentIndicator' => true ] ], |
|
48 | - [ ['currentIndicator' => false ] ] |
|
47 | + [['currentIndicator' => true]], |
|
48 | + [['currentIndicator' => false]] |
|
49 | 49 | ]; |
50 | 50 | } |
51 | 51 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | private $target = NativeLanguageForm::class; |
31 | 31 | |
32 | - private $inheritance = [ SummaryForm::class ]; |
|
32 | + private $inheritance = [SummaryForm::class]; |
|
33 | 33 | |
34 | 34 | private $attributes = [ |
35 | 35 | 'baseFieldset' => 'Cv/NativeLanguageFieldset' |
@@ -42,7 +42,7 @@ |
||
42 | 42 | ], |
43 | 43 | ]; |
44 | 44 | |
45 | - private $inheritance = [ SummaryForm::class ]; |
|
45 | + private $inheritance = [SummaryForm::class]; |
|
46 | 46 | |
47 | 47 | private $attributes = [ |
48 | 48 | 'baseFieldset' => PreferredJobFieldset::class, |
@@ -77,76 +77,76 @@ |
||
77 | 77 | public function testInitializesItself() |
78 | 78 | { |
79 | 79 | $add = [ |
80 | - [ |
|
81 | - 'name' => 'typeOfApplication', |
|
82 | - 'type' => 'select', |
|
83 | - 'options' => [ |
|
84 | - 'value_options' => $this->attributes['typeOfApplicationOptions'], |
|
85 | - 'label' => 'desired type of work', |
|
86 | - 'description' => 'Do you want to work permanently or temporary?', |
|
87 | - ], |
|
88 | - 'attributes' => [ |
|
89 | - 'title' => 'please describe your position', |
|
90 | - 'description' => 'what kind of ', |
|
91 | - 'data-placeholder' => 'please select', |
|
92 | - 'data-allowclear' => 'false', |
|
93 | - 'data-searchbox' => -1, |
|
94 | - 'multiple' => true, |
|
95 | - 'data-width' => '100%', |
|
96 | - ], |
|
97 | - ], |
|
80 | + [ |
|
81 | + 'name' => 'typeOfApplication', |
|
82 | + 'type' => 'select', |
|
83 | + 'options' => [ |
|
84 | + 'value_options' => $this->attributes['typeOfApplicationOptions'], |
|
85 | + 'label' => 'desired type of work', |
|
86 | + 'description' => 'Do you want to work permanently or temporary?', |
|
87 | + ], |
|
88 | + 'attributes' => [ |
|
89 | + 'title' => 'please describe your position', |
|
90 | + 'description' => 'what kind of ', |
|
91 | + 'data-placeholder' => 'please select', |
|
92 | + 'data-allowclear' => 'false', |
|
93 | + 'data-searchbox' => -1, |
|
94 | + 'multiple' => true, |
|
95 | + 'data-width' => '100%', |
|
96 | + ], |
|
97 | + ], |
|
98 | 98 | |
99 | - [ |
|
100 | - 'name' => 'desiredJob', |
|
101 | - 'type' => 'Text', |
|
102 | - 'options' => [ |
|
103 | - 'label' => 'desired job position', |
|
104 | - 'description' => 'Enter the title of your desired job. Eg. "Software Developer" or "Customer Service Representative"', |
|
105 | - ], |
|
106 | - 'attributes' => [ |
|
107 | - 'title' => 'please describe your position', |
|
108 | - ], |
|
109 | - ], |
|
110 | - [ |
|
111 | - 'name' => 'desiredLocations', |
|
112 | - 'type' => 'LocationSelect', |
|
113 | - 'options' => [ |
|
114 | - 'label' => 'desired job location', |
|
115 | - 'description' => 'Where do you want to work?', |
|
116 | - 'location_entity' => new Location(), |
|
117 | - ], |
|
118 | - 'attributes' => [ |
|
119 | - 'title' => 'please describe your position', |
|
120 | - 'multiple' => true, |
|
121 | - 'data-width' => '100%', |
|
122 | - ], |
|
123 | - ], |
|
124 | - [ |
|
125 | - 'name' => 'willingnessToTravel', |
|
126 | - 'type' => 'Select', |
|
127 | - 'options' => [ |
|
128 | - 'value_options' => $this->attributes['willingnessToTravelOptions'], |
|
129 | - 'label' => 'Willingness to travel', |
|
130 | - 'description' => 'Enter your willingness to travel.', |
|
131 | - ], |
|
132 | - 'attributes' => [ |
|
133 | - 'data-placeholder' => 'please select', |
|
134 | - 'data-allowclear' => 'false', |
|
135 | - 'data-searchbox' => -1, |
|
136 | - 'data-width' => '100%' |
|
137 | - ], |
|
138 | - ], |
|
139 | - [ |
|
140 | - 'name' => 'expectedSalary', |
|
141 | - 'type' => 'Text', |
|
142 | - 'options' => [ |
|
143 | - 'label' => 'expected Salary', |
|
144 | - 'description' => 'What is your expected Salary?', |
|
145 | - ], |
|
146 | - 'attributes' => [ |
|
147 | - 'title' => 'please describe your position', |
|
148 | - ], |
|
149 | - ], |
|
99 | + [ |
|
100 | + 'name' => 'desiredJob', |
|
101 | + 'type' => 'Text', |
|
102 | + 'options' => [ |
|
103 | + 'label' => 'desired job position', |
|
104 | + 'description' => 'Enter the title of your desired job. Eg. "Software Developer" or "Customer Service Representative"', |
|
105 | + ], |
|
106 | + 'attributes' => [ |
|
107 | + 'title' => 'please describe your position', |
|
108 | + ], |
|
109 | + ], |
|
110 | + [ |
|
111 | + 'name' => 'desiredLocations', |
|
112 | + 'type' => 'LocationSelect', |
|
113 | + 'options' => [ |
|
114 | + 'label' => 'desired job location', |
|
115 | + 'description' => 'Where do you want to work?', |
|
116 | + 'location_entity' => new Location(), |
|
117 | + ], |
|
118 | + 'attributes' => [ |
|
119 | + 'title' => 'please describe your position', |
|
120 | + 'multiple' => true, |
|
121 | + 'data-width' => '100%', |
|
122 | + ], |
|
123 | + ], |
|
124 | + [ |
|
125 | + 'name' => 'willingnessToTravel', |
|
126 | + 'type' => 'Select', |
|
127 | + 'options' => [ |
|
128 | + 'value_options' => $this->attributes['willingnessToTravelOptions'], |
|
129 | + 'label' => 'Willingness to travel', |
|
130 | + 'description' => 'Enter your willingness to travel.', |
|
131 | + ], |
|
132 | + 'attributes' => [ |
|
133 | + 'data-placeholder' => 'please select', |
|
134 | + 'data-allowclear' => 'false', |
|
135 | + 'data-searchbox' => -1, |
|
136 | + 'data-width' => '100%' |
|
137 | + ], |
|
138 | + ], |
|
139 | + [ |
|
140 | + 'name' => 'expectedSalary', |
|
141 | + 'type' => 'Text', |
|
142 | + 'options' => [ |
|
143 | + 'label' => 'expected Salary', |
|
144 | + 'description' => 'What is your expected Salary?', |
|
145 | + ], |
|
146 | + 'attributes' => [ |
|
147 | + 'title' => 'please describe your position', |
|
148 | + ], |
|
149 | + ], |
|
150 | 150 | ]; |
151 | 151 | |
152 | 152 | $callCount = count($add); |
@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | 'mock' => [ |
45 | 45 | 'add', |
46 | 46 | 'setName' => ['with' => 'preferredJob', 'count' => 1, 'return' => '__self__'], |
47 | - 'setHydrator' => ['@with' => ['isInstanceOf', EntityHydrator::class ], 'count' => 1, 'return' => '__self__'], |
|
48 | - 'setObject' => ['@with' => ['isInstanceOf', PreferredJob::class ], 'count' => 1, 'return' => '__self__'], |
|
47 | + 'setHydrator' => ['@with' => ['isInstanceOf', EntityHydrator::class], 'count' => 1, 'return' => '__self__'], |
|
48 | + 'setObject' => ['@with' => ['isInstanceOf', PreferredJob::class], 'count' => 1, 'return' => '__self__'], |
|
49 | 49 | ], |
50 | 50 | 'args' => false, |
51 | 51 | ], |
52 | 52 | ]; |
53 | 53 | |
54 | - private $inheritance = [ Fieldset::class ]; |
|
54 | + private $inheritance = [Fieldset::class]; |
|
55 | 55 | |
56 | 56 | private $attributes = [ |
57 | 57 | 'typeOfApplicationOptions' => [ |
@@ -151,13 +151,13 @@ discard block |
||
151 | 151 | ]; |
152 | 152 | |
153 | 153 | $callCount = count($add); |
154 | - $addArgValidator = function ($arg) use ($add, $callCount) { |
|
154 | + $addArgValidator = function($arg) use ($add, $callCount) { |
|
155 | 155 | static $count = 0; |
156 | 156 | |
157 | 157 | /* PPHUnit calls this callback again after all invokations are made |
158 | 158 | * I don't know why, but therefor the need to check if $count is greater that 7 |
159 | 159 | */ |
160 | - return $callCount - 1 < $count || $arg == $add[$count++]; |
|
160 | + return $callCount - 1 < $count || $arg == $add[$count++]; |
|
161 | 161 | }; |
162 | 162 | |
163 | 163 | $this->target |