Completed
Branch 3.x (2a3b42)
by Hari
02:40
created
src/Fieldset.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -358,46 +358,46 @@
 block discarded – undo
358 358
      * @return bool True if all the filter rules pass, false if not.
359 359
      *
360 360
      */
361
-     public function filter()
362
-     {
363
-         $success = $this->filter->apply($this);
364
-         if (! $success) {
365
-             $this->success = $success;
366
-             $this->failures = $this->filter->getFailures();
367
-         }
368
-
369
-         // Iterate on fieldset or collection and get failures
370
-         foreach ($this->inputs as $name => $input) {
371
-             if ($input instanceof Fieldset || $input instanceof Collection) {
372
-                 if (! $input->filter()) {
373
-                     $this->success = false;
374
-                     if (! $this->failures instanceof ArrayObject) {
375
-                         $this->failures = new ArrayObject();
376
-                     }
377
-                     $this->failures->offsetSet($name, $input->getFailures());
378
-                 }
379
-             }
380
-         }
381
-
382
-         // If there is no failure, then it is a success on all Filters
383
-         if (! isset($this->success) && $success) {
384
-             $this->success = true;
385
-         }
386
-
387
-         return $this->success;
388
-     }
389
-
390
-     /**
391
-      *
392
-      * Returns the failures.
393
-      *
394
-      * @return ArrayObject
395
-      *
396
-      */
397
-     public function getFailures()
398
-     {
399
-         return $this->failures;
400
-     }
361
+        public function filter()
362
+        {
363
+            $success = $this->filter->apply($this);
364
+            if (! $success) {
365
+                $this->success = $success;
366
+                $this->failures = $this->filter->getFailures();
367
+            }
368
+
369
+            // Iterate on fieldset or collection and get failures
370
+            foreach ($this->inputs as $name => $input) {
371
+                if ($input instanceof Fieldset || $input instanceof Collection) {
372
+                    if (! $input->filter()) {
373
+                        $this->success = false;
374
+                        if (! $this->failures instanceof ArrayObject) {
375
+                            $this->failures = new ArrayObject();
376
+                        }
377
+                        $this->failures->offsetSet($name, $input->getFailures());
378
+                    }
379
+                }
380
+            }
381
+
382
+            // If there is no failure, then it is a success on all Filters
383
+            if (! isset($this->success) && $success) {
384
+                $this->success = true;
385
+            }
386
+
387
+            return $this->success;
388
+        }
389
+
390
+        /**
391
+         *
392
+         * Returns the failures.
393
+         *
394
+         * @return ArrayObject
395
+         *
396
+         */
397
+        public function getFailures()
398
+        {
399
+            return $this->failures;
400
+        }
401 401
 
402 402
     /**
403 403
      *
Please login to merge, or discard this patch.