This repository was archived by the owner on Jan 31, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ The following options are supported:
24
24
$validator = new \Zend\Validator\File\Crc32('3b3652f');
25
25
26
26
// Or, check file against multiple hashes
27
- $validator = new \Zend\Validator\File\Crc32(array( '3b3652f', 'e612b69') );
27
+ $validator = new \Zend\Validator\File\Crc32([ '3b3652f', 'e612b69'] );
28
28
29
29
// Perform validation with file path
30
30
if ($validator->isValid('./myfile.txt')) {
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ $form->add([
68
68
$form->add([
69
69
'name' => 'elementTwo',
70
70
'type' => 'Password',
71
- 'validators' => array(
71
+ 'validators' => [
72
72
[
73
73
'name' => 'Identical',
74
74
'options' => [
@@ -136,7 +136,7 @@ $inputFilter = new InputFilter();
136
136
$inputFilter->add([
137
137
'name' => 'confirmEmail', // references (5)
138
138
'validators' => [
139
- array(
139
+ [
140
140
'name' => 'Identical',
141
141
'options' => [
142
142
// 'user' key references 'user' fieldset (1), and 'email'
@@ -162,7 +162,7 @@ $inputFilter->add([
162
162
// 'deeperFieldsetInput' element (4)
163
163
'deeperFieldset' => 'deeperFieldsetInput',
164
164
],
165
- ],
165
+ ],
166
166
],
167
167
],
168
168
],
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ Basic usage is to provide an array during instantiation:
35
35
36
36
``` php
37
37
$validator = new Zend\Validator\InArray([
38
- 'haystack' => ['value1', 'value2',...'valueN']
38
+ 'haystack' => ['value1', 'value2',...'valueN'],
39
39
]);
40
40
41
41
if ($validator->isValid('value')) {
@@ -83,7 +83,7 @@ It's possible to set the strict mode at initialisation and afterwards with the
83
83
``` php
84
84
// defaults to InArray::COMPARE_NOT_STRICT_AND_PREVENT_STR_TO_INT_VULNERABILITY
85
85
$validator = new Zend\Validator\InArray([
86
- 'haystack' => array( 'value1', 'value2', /* ... */ 'valueN') ,
86
+ 'haystack' => [ 'value1', 'value2', /* ... */ 'valueN'] ,
87
87
]);
88
88
89
89
// set strict mode
@@ -118,7 +118,7 @@ To validate multidimensional arrays you have to set the `recursive` option.
118
118
119
119
``` php
120
120
$validator = new Zend\Validator\InArray([
121
- 'haystack' => array(
121
+ 'haystack' => [
122
122
'firstDimension' => ['value1', 'value2', / ... */ 'valueN'],
123
123
'secondDimension' => ['foo1', 'foo2', /* ... */ 'fooN'],
124
124
],
You can’t perform that action at this time.
0 commit comments