@@ -85,7 +85,7 @@ |
||
85 | 85 | { |
86 | 86 | $passed = true; |
87 | 87 | foreach ($this->fieldsets as $key => $fieldset) { |
88 | - if (! $fieldset->filter()) { |
|
88 | + if (!$fieldset->filter()) { |
|
89 | 89 | $passed = false; |
90 | 90 | } |
91 | 91 | } |
@@ -74,7 +74,7 @@ |
||
74 | 74 | */ |
75 | 75 | public function fill(array $data) |
76 | 76 | { |
77 | - if ($this->anti_csrf && ! $this->anti_csrf->isValid($data)) { |
|
77 | + if ($this->anti_csrf && !$this->anti_csrf->isValid($data)) { |
|
78 | 78 | throw new Exception\CsrfViolation; |
79 | 79 | } |
80 | 80 | parent::fill($data); |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | // if the rule did not pass, retain a message for the field. |
102 | 102 | // note that it is in an array, so that other implementations |
103 | 103 | // can allow for multiple messages. |
104 | - if (! $passed) { |
|
105 | - if (! isset($this->messages[$field])) { |
|
104 | + if (!$passed) { |
|
105 | + if (!isset($this->messages[$field])) { |
|
106 | 106 | $this->messages[$field][] = $message; |
107 | 107 | } else { |
108 | 108 | // the message should be first. |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public function addMessages($field, $messages) |
142 | 142 | { |
143 | - if (! isset($this->messages[$field])) { |
|
143 | + if (!isset($this->messages[$field])) { |
|
144 | 144 | $this->messages[$field][] = $messages; |
145 | 145 | } else { |
146 | 146 | $this->messages[$field] = array_merge( |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function newField($name, $type = null) |
75 | 75 | { |
76 | - if (! $type) { |
|
76 | + if (!$type) { |
|
77 | 77 | $type = 'text'; |
78 | 78 | } |
79 | 79 | $class = $this->field_class; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function newFieldset($name, $type = null) |
97 | 97 | { |
98 | - if (! $type) { |
|
98 | + if (!$type) { |
|
99 | 99 | $type = $name; |
100 | 100 | } |
101 | 101 | $factory = $this->fieldset_map[$type]; |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function newCollection($name, $type = null) |
119 | 119 | { |
120 | - if (! $type) { |
|
120 | + if (!$type) { |
|
121 | 121 | $type = $name; |
122 | 122 | } |
123 | 123 | $class = $this->collection_class; |
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | public function newInstance($name) |
57 | 57 | { |
58 | - if (! isset($this->map[$name])) { |
|
58 | + if (!isset($this->map[$name])) { |
|
59 | 59 | throw new Exception\NoSuchForm($name); |
60 | 60 | } |
61 | 61 |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | error_reporting(E_ALL); |
3 | 3 | $autoloader = __DIR__ . '/vendor/autoload.php'; |
4 | -if (! file_exists($autoloader)) { |
|
4 | +if (!file_exists($autoloader)) { |
|
5 | 5 | echo "Composer autoloader not found: $autoloader" . PHP_EOL; |
6 | 6 | echo "Please issue 'composer install' and try again." . PHP_EOL; |
7 | 7 | exit(1); |
@@ -353,8 +353,8 @@ |
||
353 | 353 | * @return bool True if all the filter rules pass, false if not. |
354 | 354 | * |
355 | 355 | */ |
356 | - public function filter() |
|
357 | - { |
|
356 | + public function filter() |
|
357 | + { |
|
358 | 358 | $this->success = $this->filter->apply($this); |
359 | 359 | $this->failures = $this->filter->getFailures(); |
360 | 360 |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | */ |
143 | 143 | public function __isset($name) |
144 | 144 | { |
145 | - if (! isset($this->inputs[$name])) { |
|
145 | + if (!isset($this->inputs[$name])) { |
|
146 | 146 | return false; |
147 | 147 | } |
148 | 148 | |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | */ |
189 | 189 | public function getInput($name) |
190 | 190 | { |
191 | - if (! isset($this->inputs[$name])) { |
|
191 | + if (!isset($this->inputs[$name])) { |
|
192 | 192 | throw new Exception\NoSuchInput($name); |
193 | 193 | } |
194 | 194 | |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | // Iterate on fieldset or collection and get failures |
362 | 362 | foreach ($this->inputs as $name => $input) { |
363 | 363 | if ($input instanceof Fieldset || $input instanceof Collection) { |
364 | - if (! $input->filter()) { |
|
364 | + if (!$input->filter()) { |
|
365 | 365 | $this->success = false; |
366 | 366 | $this->failures->offsetSet($name, $input->getFailures()); |
367 | 367 | } |