Completed
Pull Request — 3.x (#61)
by Hari
02:18
created
src/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Builder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/FormFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
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
         
Please login to merge, or discard this patch.
phpunit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Fieldset.php 4 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -353,8 +353,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
                 }
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      *
109 109
      * @param string $name The input name.
110 110
      *
111
-     * @return mixed The input value.
111
+     * @return AbstractInput The input value.
112 112
      *
113 113
      */
114 114
     public function __get($name)
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
      *
335 335
      * @param string $name The input name.
336 336
      *
337
-     * @return mixed
337
+     * @return AbstractInput
338 338
      *
339 339
      */
340 340
     public function get($name = null)
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
  */
11 11
 namespace Aura\Input;
12 12
 
13
-use ArrayObject;
14 13
 use Aura\Filter_Interface\FilterInterface;
15 14
 use Aura\Filter_Interface\FailureCollectionInterface;
16 15
 
Please login to merge, or discard this patch.
src/Filter.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
      *
81 81
      * @param string $message The message when the rule fails.
82 82
      *
83
-     * @param Closure $closure A closure that implements the rule. It must
83
+     * @param \Closure $closure A closure that implements the rule. It must
84 84
      * have the signature `function ($value, &$fields)`; it must return
85 85
      * boolean true on success, or boolean false on failure.
86 86
      *
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
                 // apply the closure to the data and get back the result
113 113
                 $passed = $closure($values->$field, $values);
114 114
 
115
-                if (! $passed) {
115
+                if (!$passed) {
116 116
                     $this->failures->addMessagesForField($field, $message);
117 117
                 }
118 118
             }
Please login to merge, or discard this patch.
src/Filter/FailureCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function addMessagesForField($field, $messages)
48 48
     {
49
-        if (! isset($this->messages[$field])) {
49
+        if (!isset($this->messages[$field])) {
50 50
             $this->messages[$field] = [];
51 51
         }
52 52
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public function getMessagesForField($field)
81 81
     {
82
-        if (! isset($this->messages[$field])) {
82
+        if (!isset($this->messages[$field])) {
83 83
             return array();
84 84
         }
85 85
 
Please login to merge, or discard this patch.