Passed
Push — master ( 69f647...6585a1 )
by Sebastian
04:37
created
src/Request/Param/Filter/Boolean.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     
21 21
     protected function _filter()
22 22
     {
23
-        if($this->value === 'yes' || $this->value === 'true' || $this->value === true) {
23
+        if ($this->value === 'yes' || $this->value === 'true' || $this->value === true) {
24 24
             return true;
25 25
         }
26 26
         
Please login to merge, or discard this patch.
src/Request/Param/Filter/CommaSeparated.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
     
24 24
     protected function _filter()
25 25
     {
26
-        if(is_array($this->value)) {
26
+        if (is_array($this->value)) {
27 27
             return $this->value;
28 28
         }
29 29
         
30
-        if($this->value === '' || $this->value === null || !is_string($this->value)) {
30
+        if ($this->value === '' || $this->value === null || !is_string($this->value)) {
31 31
             return array();
32 32
         }
33 33
         
@@ -35,19 +35,19 @@  discard block
 block discarded – undo
35 35
         $stripEmptyEntries = $this->getBoolOption('stripEmptyEntries');
36 36
         $result = explode(',', $this->value);
37 37
         
38
-        if(!$trimEntries && !$stripEmptyEntries) {
38
+        if (!$trimEntries && !$stripEmptyEntries) {
39 39
             return $result;
40 40
         }
41 41
         
42 42
         $keep = array();
43 43
         
44
-        foreach($result as $entry)
44
+        foreach ($result as $entry)
45 45
         {
46
-            if($trimEntries === true) {
46
+            if ($trimEntries === true) {
47 47
                 $entry = trim($entry);
48 48
             }
49 49
             
50
-            if($stripEmptyEntries === true && $entry === '') {
50
+            if ($stripEmptyEntries === true && $entry === '') {
51 51
                 continue;
52 52
             }
53 53
             
Please login to merge, or discard this patch.
src/Request/Param/Filter/String.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     
21 21
     protected function _filter()
22 22
     {
23
-        if(!is_scalar($this->value)) {
23
+        if (!is_scalar($this->value)) {
24 24
             return '';
25 25
         }
26 26
         
Please login to merge, or discard this patch.
src/Request/Param/Validator/Alpha.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 block discarded – undo
27 27
     
28 28
     protected function _validate()
29 29
     {
30
-        if(!is_scalar($this->value)) {
30
+        if (!is_scalar($this->value)) {
31 31
             return null;
32 32
         }
33 33
         
34
-        if(preg_match('/\A[a-zA-Z]+\z/', $this->value)) {
34
+        if (preg_match('/\A[a-zA-Z]+\z/', $this->value)) {
35 35
             return $this->value;
36 36
         }
37 37
         
Please login to merge, or discard this patch.
src/Request/Param/Validator/Callback.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         array_unshift($args, $this->value);
35 35
         
36 36
         $result = call_user_func_array($this->getOption('callback'), $args);
37
-        if($result !== false) {
37
+        if ($result !== false) {
38 38
             return $this->value;
39 39
         }
40 40
         
Please login to merge, or discard this patch.
src/Request/Param/Validator/Integer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     
31 31
     protected function _validate()
32 32
     {
33
-        if(ConvertHelper::isInteger($this->value)) {
33
+        if (ConvertHelper::isInteger($this->value)) {
34 34
             return intval($this->value);
35 35
         }
36 36
         
Please login to merge, or discard this patch.
src/Request/Param/Validator/Url.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@
 block discarded – undo
27 27
     
28 28
     protected function _validate()
29 29
     {
30
-        if(!is_string($this->value)) {
30
+        if (!is_string($this->value)) {
31 31
             return '';
32 32
         }
33 33
         
34 34
         $info = parseURL($this->value);
35
-        if($info->isValid()) {
35
+        if ($info->isValid()) {
36 36
             return $this->value;
37 37
         }
38 38
         
Please login to merge, or discard this patch.
src/Request/Param/Validator/Numeric.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     
28 28
     protected function _validate()
29 29
     {
30
-        if(is_numeric($this->value)) {
30
+        if (is_numeric($this->value)) {
31 31
             return $this->value * 1;
32 32
         }
33 33
         
Please login to merge, or discard this patch.
src/Request/Param/Validator/Json.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,26 +29,26 @@
 block discarded – undo
29 29
     
30 30
     protected function _validate()
31 31
     {
32
-        if(!is_string($this->value)) {
32
+        if (!is_string($this->value)) {
33 33
             return '';
34 34
         }
35 35
         
36 36
         $value = trim($this->value);
37 37
         
38
-        if(empty($value)) {
38
+        if (empty($value)) {
39 39
             return '';
40 40
         }
41 41
         
42 42
         // strictly validate for objects?
43
-        if($this->getBoolOption('arrays') === false)
43
+        if ($this->getBoolOption('arrays') === false)
44 44
         {
45
-            if(is_object(json_decode($value))) {
45
+            if (is_object(json_decode($value))) {
46 46
                 return $value;
47 47
             }
48 48
         }
49 49
         else
50 50
         {
51
-            if(is_array(json_decode($value, true))) {
51
+            if (is_array(json_decode($value, true))) {
52 52
                 return $value;
53 53
             }
54 54
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@
 block discarded – undo
45 45
             if(is_object(json_decode($value))) {
46 46
                 return $value;
47 47
             }
48
-        }
49
-        else
48
+        } else
50 49
         {
51 50
             if(is_array(json_decode($value, true))) {
52 51
                 return $value;
Please login to merge, or discard this patch.