@@ -47,19 +47,19 @@ discard block |
||
47 | 47 | 'mock' => [ |
48 | 48 | 'add', |
49 | 49 | 'setName' => ['with' => 'employment', 'count' => 1, 'return' => '__self__'], |
50 | - 'setHydrator' => ['@with' => ['isInstanceOf', EntityHydrator::class ], 'count' => 1, 'return' => '__self__'], |
|
51 | - 'setObject' => ['@with' => ['isInstanceOf', Employment::class ], 'count' => 1, 'return' => '__self__'], |
|
50 | + 'setHydrator' => ['@with' => ['isInstanceOf', EntityHydrator::class], 'count' => 1, 'return' => '__self__'], |
|
51 | + 'setObject' => ['@with' => ['isInstanceOf', Employment::class], 'count' => 1, 'return' => '__self__'], |
|
52 | 52 | ], |
53 | 53 | 'args' => false, |
54 | 54 | ], |
55 | 55 | '@testPopulateValues' => [ |
56 | - 'mock' => [ 'get' ], |
|
56 | + 'mock' => ['get'], |
|
57 | 57 | ], |
58 | 58 | ]; |
59 | 59 | |
60 | - private $inheritance = [ Fieldset::class, InputFilterProviderInterface::class, ViewPartialProviderInterface::class ]; |
|
60 | + private $inheritance = [Fieldset::class, InputFilterProviderInterface::class, ViewPartialProviderInterface::class]; |
|
61 | 61 | |
62 | - private $traits = [ ViewPartialProviderTrait::class ]; |
|
62 | + private $traits = [ViewPartialProviderTrait::class]; |
|
63 | 63 | |
64 | 64 | private $attributes = [ |
65 | 65 | 'defaultPartial' => 'cv/form/employment', |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | ], |
110 | 110 | ]; |
111 | 111 | |
112 | - $addArgValidator = function ($arg) use ($add) { |
|
112 | + $addArgValidator = function($arg) use ($add) { |
|
113 | 113 | static $count = 0; |
114 | 114 | |
115 | 115 | /* PPHUnit calls this callback again after all invokations are made |
@@ -137,11 +137,11 @@ discard block |
||
137 | 137 | public function populateValuesDataProvider() |
138 | 138 | { |
139 | 139 | return [ |
140 | - [ [ ], false ], |
|
141 | - [ ['currentIndicator'=>true], false ], |
|
142 | - [ ['currentIndicator' => false, 'endDate' => 'endDate' ], false ], |
|
143 | - [ ['endDate' => 'endDate'], false ], |
|
144 | - [ ['currentIndicator' => true, 'endDate' => 'endDate'], true ], |
|
140 | + [[], false], |
|
141 | + [['currentIndicator'=>true], false], |
|
142 | + [['currentIndicator' => false, 'endDate' => 'endDate'], false], |
|
143 | + [['endDate' => 'endDate'], false], |
|
144 | + [['currentIndicator' => true, 'endDate' => 'endDate'], true], |
|
145 | 145 | ]; |
146 | 146 | } |
147 | 147 |
@@ -76,37 +76,37 @@ |
||
76 | 76 | ] |
77 | 77 | ], |
78 | 78 | [ |
79 | - 'type' => 'Core/Datepicker', |
|
80 | - 'name' => 'endDate', |
|
81 | - 'options' => [ |
|
82 | - 'label' => 'End date' |
|
83 | - ], |
|
79 | + 'type' => 'Core/Datepicker', |
|
80 | + 'name' => 'endDate', |
|
81 | + 'options' => [ |
|
82 | + 'label' => 'End date' |
|
83 | + ], |
|
84 | 84 | ], |
85 | - [ |
|
86 | - 'type' => 'checkbox', |
|
87 | - 'name' => 'currentIndicator', |
|
88 | - 'options' => [ |
|
89 | - 'label' => 'ongoing' |
|
90 | - ] |
|
91 | - ], |
|
92 | - [ |
|
93 | - 'name' => 'organizationName', |
|
94 | - 'options' => [ |
|
95 | - 'label' => 'Company Name'], |
|
96 | - 'attributes' => [ |
|
97 | - 'title' => 'please enter the name of the company' |
|
98 | - ], |
|
99 | - ], |
|
100 | - [ |
|
101 | - 'name' => 'description', |
|
102 | - 'type' => 'Laminas\Form\Element\Textarea', |
|
103 | - 'options' => [ |
|
104 | - 'label' => 'Description', |
|
105 | - ], |
|
106 | - 'attributes' => [ |
|
107 | - 'title' => 'please describe your position', |
|
108 | - ], |
|
109 | - ], |
|
85 | + [ |
|
86 | + 'type' => 'checkbox', |
|
87 | + 'name' => 'currentIndicator', |
|
88 | + 'options' => [ |
|
89 | + 'label' => 'ongoing' |
|
90 | + ] |
|
91 | + ], |
|
92 | + [ |
|
93 | + 'name' => 'organizationName', |
|
94 | + 'options' => [ |
|
95 | + 'label' => 'Company Name'], |
|
96 | + 'attributes' => [ |
|
97 | + 'title' => 'please enter the name of the company' |
|
98 | + ], |
|
99 | + ], |
|
100 | + [ |
|
101 | + 'name' => 'description', |
|
102 | + 'type' => 'Laminas\Form\Element\Textarea', |
|
103 | + 'options' => [ |
|
104 | + 'label' => 'Description', |
|
105 | + ], |
|
106 | + 'attributes' => [ |
|
107 | + 'title' => 'please describe your position', |
|
108 | + ], |
|
109 | + ], |
|
110 | 110 | ]; |
111 | 111 | |
112 | 112 | $addArgValidator = function ($arg) use ($add) { |
@@ -47,19 +47,19 @@ discard block |
||
47 | 47 | 'mock' => [ |
48 | 48 | 'add', |
49 | 49 | 'setName' => ['with' => 'education', 'count' => 1, 'return' => '__self__'], |
50 | - 'setHydrator' => ['@with' => ['isInstanceOf', EntityHydrator::class ], 'count' => 1, 'return' => '__self__'], |
|
51 | - 'setObject' => ['@with' => ['isInstanceOf', Education::class ], 'count' => 1, 'return' => '__self__'], |
|
50 | + 'setHydrator' => ['@with' => ['isInstanceOf', EntityHydrator::class], 'count' => 1, 'return' => '__self__'], |
|
51 | + 'setObject' => ['@with' => ['isInstanceOf', Education::class], 'count' => 1, 'return' => '__self__'], |
|
52 | 52 | ], |
53 | 53 | 'args' => false, |
54 | 54 | ], |
55 | 55 | '@testPopulateValues' => [ |
56 | - 'mock' => [ 'get' ], |
|
56 | + 'mock' => ['get'], |
|
57 | 57 | ], |
58 | 58 | ]; |
59 | 59 | |
60 | - private $inheritance = [ Fieldset::class, InputFilterProviderInterface::class, ViewPartialProviderInterface::class ]; |
|
60 | + private $inheritance = [Fieldset::class, InputFilterProviderInterface::class, ViewPartialProviderInterface::class]; |
|
61 | 61 | |
62 | - private $traits = [ ViewPartialProviderTrait::class ]; |
|
62 | + private $traits = [ViewPartialProviderTrait::class]; |
|
63 | 63 | |
64 | 64 | private $attributes = [ |
65 | 65 | 'defaultPartial' => 'cv/form/education', |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | ], |
136 | 136 | ]; |
137 | 137 | |
138 | - $addArgValidator = function ($arg) use ($add) { |
|
138 | + $addArgValidator = function($arg) use ($add) { |
|
139 | 139 | static $count = 0; |
140 | 140 | |
141 | 141 | /* PPHUnit calls this callback again after all invokations are made |
@@ -163,11 +163,11 @@ discard block |
||
163 | 163 | public function populateValuesDataProvider() |
164 | 164 | { |
165 | 165 | return [ |
166 | - [ [ ], false ], |
|
167 | - [ ['currentIndicator'=>true], false ], |
|
168 | - [ ['currentIndicator' => false, 'endDate' => 'endDate' ], false ], |
|
169 | - [ ['endDate' => 'endDate'], false ], |
|
170 | - [ ['currentIndicator' => true, 'endDate' => 'endDate'], true ], |
|
166 | + [[], false], |
|
167 | + [['currentIndicator'=>true], false], |
|
168 | + [['currentIndicator' => false, 'endDate' => 'endDate'], false], |
|
169 | + [['endDate' => 'endDate'], false], |
|
170 | + [['currentIndicator' => true, 'endDate' => 'endDate'], true], |
|
171 | 171 | ]; |
172 | 172 | } |
173 | 173 |
@@ -78,61 +78,61 @@ |
||
78 | 78 | ] |
79 | 79 | ], |
80 | 80 | [ |
81 | - 'type' => 'Core/Datepicker', |
|
82 | - 'name' => 'endDate', |
|
83 | - 'options' => [ |
|
84 | - 'label' => 'End date' |
|
85 | - ], |
|
81 | + 'type' => 'Core/Datepicker', |
|
82 | + 'name' => 'endDate', |
|
83 | + 'options' => [ |
|
84 | + 'label' => 'End date' |
|
85 | + ], |
|
86 | 86 | ], |
87 | - [ |
|
88 | - 'type' => 'checkbox', |
|
89 | - 'name' => 'currentIndicator', |
|
90 | - 'options' => [ |
|
91 | - 'label' => 'ongoing' |
|
92 | - ] |
|
93 | - ], |
|
94 | - [ |
|
95 | - 'name' => 'competencyName', |
|
96 | - 'options' => [ |
|
97 | - 'label' => 'Degree'], |
|
98 | - 'attributes' => [ |
|
99 | - 'title' => 'please enter the name of your qualification' |
|
100 | - ], |
|
101 | - ], |
|
102 | - [ |
|
103 | - 'name' => 'organizationName', |
|
104 | - 'options' => [ |
|
105 | - 'label' => 'Organization Name'], |
|
106 | - 'attributes' => [ |
|
107 | - 'title' => 'please enter the name of the university or school' |
|
108 | - ], |
|
109 | - ], |
|
87 | + [ |
|
88 | + 'type' => 'checkbox', |
|
89 | + 'name' => 'currentIndicator', |
|
90 | + 'options' => [ |
|
91 | + 'label' => 'ongoing' |
|
92 | + ] |
|
93 | + ], |
|
94 | + [ |
|
95 | + 'name' => 'competencyName', |
|
96 | + 'options' => [ |
|
97 | + 'label' => 'Degree'], |
|
98 | + 'attributes' => [ |
|
99 | + 'title' => 'please enter the name of your qualification' |
|
100 | + ], |
|
101 | + ], |
|
102 | + [ |
|
103 | + 'name' => 'organizationName', |
|
104 | + 'options' => [ |
|
105 | + 'label' => 'Organization Name'], |
|
106 | + 'attributes' => [ |
|
107 | + 'title' => 'please enter the name of the university or school' |
|
108 | + ], |
|
109 | + ], |
|
110 | 110 | [ |
111 | - 'name' => 'country', |
|
112 | - 'options' => [ |
|
113 | - 'label' => 'Country'], |
|
114 | - 'attributes' => [ |
|
115 | - 'title' => /*@translate */ 'please select the country' |
|
116 | - ], |
|
117 | - ], |
|
118 | - [ |
|
119 | - 'name' => 'city', |
|
120 | - 'options' => [ |
|
121 | - 'label' => 'City'], |
|
122 | - 'attributes' => [ |
|
123 | - 'title' => 'please enter the name of the city' |
|
124 | - ], |
|
125 | - ], |
|
126 | - [ |
|
127 | - 'name' => 'description', |
|
128 | - 'type' => 'Laminas\Form\Element\Textarea', |
|
129 | - 'options' => [ |
|
130 | - 'label' => 'Description', |
|
131 | - ], |
|
132 | - 'attributes' => [ |
|
133 | - 'title' => 'please enter a description', |
|
134 | - ], |
|
135 | - ], |
|
111 | + 'name' => 'country', |
|
112 | + 'options' => [ |
|
113 | + 'label' => 'Country'], |
|
114 | + 'attributes' => [ |
|
115 | + 'title' => /*@translate */ 'please select the country' |
|
116 | + ], |
|
117 | + ], |
|
118 | + [ |
|
119 | + 'name' => 'city', |
|
120 | + 'options' => [ |
|
121 | + 'label' => 'City'], |
|
122 | + 'attributes' => [ |
|
123 | + 'title' => 'please enter the name of the city' |
|
124 | + ], |
|
125 | + ], |
|
126 | + [ |
|
127 | + 'name' => 'description', |
|
128 | + 'type' => 'Laminas\Form\Element\Textarea', |
|
129 | + 'options' => [ |
|
130 | + 'label' => 'Description', |
|
131 | + ], |
|
132 | + 'attributes' => [ |
|
133 | + 'title' => 'please enter a description', |
|
134 | + ], |
|
135 | + ], |
|
136 | 136 | ]; |
137 | 137 | |
138 | 138 | $addArgValidator = function ($arg) use ($add) { |
@@ -68,11 +68,11 @@ |
||
68 | 68 | |
69 | 69 | public function testWritingConfigFileWorks() |
70 | 70 | { |
71 | - $dir = sys_get_temp_dir() . '/YawikConfigCreator-' . uniqid(); |
|
71 | + $dir = sys_get_temp_dir().'/YawikConfigCreator-'.uniqid(); |
|
72 | 72 | |
73 | 73 | mkdir($dir); |
74 | - mkdir($dir . '/config'); |
|
75 | - mkdir($dir . '/config/autoload'); |
|
74 | + mkdir($dir.'/config'); |
|
75 | + mkdir($dir.'/config/autoload'); |
|
76 | 76 | |
77 | 77 | chdir($dir); |
78 | 78 |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $dm = $this->createMock(DocumentManager::class); |
55 | 55 | |
56 | 56 | $this->target = new UserCreator($credentialFilter, $dm); |
57 | - $this->credentialFilter= $credentialFilter; |
|
57 | + $this->credentialFilter = $credentialFilter; |
|
58 | 58 | $this->documentManager = $dm; |
59 | 59 | } |
60 | 60 |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | public function invalidConnectionStringProvider() |
47 | 47 | { |
48 | 48 | return [ |
49 | - [ 'noconnstr' ], |
|
50 | - [ 'mongodb://user name:pass@server' ], |
|
51 | - [ 'mongodb://server/db.with.dot' ], |
|
49 | + ['noconnstr'], |
|
50 | + ['mongodb://user name:pass@server'], |
|
51 | + ['mongodb://server/db.with.dot'], |
|
52 | 52 | ]; |
53 | 53 | } |
54 | 54 | |
@@ -59,26 +59,26 @@ discard block |
||
59 | 59 | { |
60 | 60 | $target = new MongoDbConnectionString(); |
61 | 61 | |
62 | - $this->assertFalse($target->isValid($connStr), 'Failed with: ' . $connStr); |
|
62 | + $this->assertFalse($target->isValid($connStr), 'Failed with: '.$connStr); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | public function validConnectionStringsProvider() |
66 | 66 | { |
67 | 67 | return [ |
68 | - [ 'mongodb://server' ], |
|
69 | - [ 'mongodb://server/database' ], |
|
70 | - [ 'mongodb://server:1234' ], |
|
71 | - [ 'mongodb://server:1234/database' ], |
|
72 | - [ 'mongodb://user@server' ], |
|
73 | - [ 'mongodb://user@server:1234' ], |
|
74 | - [ 'mongodb://user@server/database' ], |
|
75 | - [ 'mongodb://user@server:1234/database' ], |
|
76 | - [ 'mongodb://user:pass@server' ], |
|
77 | - [ 'mongodb://user:pass@server/database' ], |
|
78 | - [ 'mongodb://user:pass@server:1234' ], |
|
79 | - [ 'mongodb://user:pass@server:1234/database' ], |
|
80 | - [ 'mongodb://server:23432/dbName?option=value' ], |
|
81 | - [ 'mongodb://name:[email protected]:27017,cluster0-shard-00-01-nvwmc.mongodb.net:27017,cluster0-shard-00-02-nvwmc.mongodb.net:27017/?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin' ], |
|
68 | + ['mongodb://server'], |
|
69 | + ['mongodb://server/database'], |
|
70 | + ['mongodb://server:1234'], |
|
71 | + ['mongodb://server:1234/database'], |
|
72 | + ['mongodb://user@server'], |
|
73 | + ['mongodb://user@server:1234'], |
|
74 | + ['mongodb://user@server/database'], |
|
75 | + ['mongodb://user@server:1234/database'], |
|
76 | + ['mongodb://user:pass@server'], |
|
77 | + ['mongodb://user:pass@server/database'], |
|
78 | + ['mongodb://user:pass@server:1234'], |
|
79 | + ['mongodb://user:pass@server:1234/database'], |
|
80 | + ['mongodb://server:23432/dbName?option=value'], |
|
81 | + ['mongodb://name:[email protected]:27017,cluster0-shard-00-01-nvwmc.mongodb.net:27017,cluster0-shard-00-02-nvwmc.mongodb.net:27017/?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin'], |
|
82 | 82 | ]; |
83 | 83 | } |
84 | 84 | |
@@ -91,6 +91,6 @@ discard block |
||
91 | 91 | { |
92 | 92 | $target = new MongoDbConnectionString(); |
93 | 93 | |
94 | - $this->assertTrue($target->isValid($connStr), 'Failed with: "' . $connStr . '"'); |
|
94 | + $this->assertTrue($target->isValid($connStr), 'Failed with: "'.$connStr.'"'); |
|
95 | 95 | } |
96 | 96 | } |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | public function testInit() |
35 | 35 | { |
36 | 36 | $target = $this->getMockBuilder('\Install\Form\Installation') |
37 | - ->setMethods(array('add', 'setName', 'setAttributes')) |
|
38 | - ->disableOriginalConstructor() |
|
39 | - ->getMock(); |
|
37 | + ->setMethods(array('add', 'setName', 'setAttributes')) |
|
38 | + ->disableOriginalConstructor() |
|
39 | + ->getMock(); |
|
40 | 40 | |
41 | 41 | $add1 = array( |
42 | 42 | 'type' => 'Text', |
@@ -74,19 +74,19 @@ discard block |
||
74 | 74 | ); |
75 | 75 | |
76 | 76 | $target->expects($this->exactly(4)) |
77 | - ->method('add') |
|
78 | - ->withConsecutive( |
|
79 | - array($add1), |
|
80 | - array($add2), |
|
81 | - array($add3), |
|
82 | - array($add4) |
|
83 | - )->will($this->returnSelf()); |
|
77 | + ->method('add') |
|
78 | + ->withConsecutive( |
|
79 | + array($add1), |
|
80 | + array($add2), |
|
81 | + array($add3), |
|
82 | + array($add4) |
|
83 | + )->will($this->returnSelf()); |
|
84 | 84 | |
85 | 85 | $target->expects($this->once())->method('setName')->with('installation'); |
86 | 86 | $target->expects($this->once())->method('setAttributes')->with( |
87 | 87 | array( |
88 | - 'method' => 'post', |
|
89 | - ) |
|
88 | + 'method' => 'post', |
|
89 | + ) |
|
90 | 90 | ); |
91 | 91 | /* @var $target \PHPUnit_Framework_MockObject_MockObject|\Install\Form\Installation */ |
92 | 92 | $target->init(); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | ), |
104 | 104 | 'validators' => array( |
105 | 105 | array('name' => MongoDbConnectionString::class, |
106 | - 'break_chain_on_failure' => true), |
|
106 | + 'break_chain_on_failure' => true), |
|
107 | 107 | array('name' => MongoDbConnection::class), |
108 | 108 | ), |
109 | 109 | ), |
@@ -5,7 +5,7 @@ |
||
5 | 5 | // This should be an array of module namespaces used in the application. |
6 | 6 | |
7 | 7 | use PHPUnit\Framework\TestCase; |
8 | - 'modules' => array_merge($commonModules,array( |
|
8 | + 'modules' => array_merge($commonModules, array( |
|
9 | 9 | 'Install', |
10 | 10 | )), |
11 | 11 |
@@ -64,7 +64,7 @@ |
||
64 | 64 | // ), |
65 | 65 | // ) |
66 | 66 | |
67 | - // Initial configuration with which to seed the ServiceManager. |
|
68 | - // Should be compatible with Laminas\ServiceManager\Config. |
|
69 | - // 'service_manager' => array(), |
|
67 | + // Initial configuration with which to seed the ServiceManager. |
|
68 | + // Should be compatible with Laminas\ServiceManager\Config. |
|
69 | + // 'service_manager' => array(), |
|
70 | 70 | ); |
71 | 71 | \ No newline at end of file |
@@ -29,5 +29,5 @@ |
||
29 | 29 | |
30 | 30 | private $target = MissingParentOrganizationException::class; |
31 | 31 | |
32 | - private $inheritance = [ ExceptionInterface::class ]; |
|
32 | + private $inheritance = [ExceptionInterface::class]; |
|
33 | 33 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $builder->expects($this->any()) |
79 | 79 | ->method('field') |
80 | 80 | ->willReturnMap([ |
81 | - ['permissions.view',$builder] |
|
81 | + ['permissions.view', $builder] |
|
82 | 82 | ]) |
83 | 83 | ; |
84 | 84 | |
@@ -121,20 +121,20 @@ discard block |
||
121 | 121 | $builder->expects($this->any()) |
122 | 122 | ->method('field') |
123 | 123 | ->willReturnMap([ |
124 | - ['profileSetting',$builder], |
|
125 | - ['id',$builder], |
|
126 | - ['organization',$builder], |
|
127 | - ['status.name',$builder], |
|
128 | - ['isDraft',$builder], |
|
129 | - ['profileSetting',$builder] |
|
124 | + ['profileSetting', $builder], |
|
125 | + ['id', $builder], |
|
126 | + ['organization', $builder], |
|
127 | + ['status.name', $builder], |
|
128 | + ['isDraft', $builder], |
|
129 | + ['profileSetting', $builder] |
|
130 | 130 | ]) |
131 | 131 | ; |
132 | 132 | |
133 | 133 | $builder->expects($this->exactly(2)) |
134 | 134 | ->method('notIn') |
135 | 135 | ->willReturnMap([ |
136 | - [ [StatusInterface::EXPIRED, StatusInterface::INACTIVE], $builder], |
|
137 | - [ ['some-id'],$builder ] |
|
136 | + [[StatusInterface::EXPIRED, StatusInterface::INACTIVE], $builder], |
|
137 | + [['some-id'], $builder] |
|
138 | 138 | ]) |
139 | 139 | ; |
140 | 140 |