Completed
Branch master (856c90)
by Andres
02:46
created
functions.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 /**
4 4
  * @param $name
5
- * @param array $args
6 5
  * @return \Comfort\Comfort
7 6
  */
8 7
 function cmf()
Please login to merge, or discard this patch.
src/Validator/StringValidator.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 namespace Comfort\Validator;
3 3
 
4 4
 use Comfort\Comfort;
5
-use Comfort\Validator\StringValidator\UriMethod;
6 5
 
7 6
 class StringValidator extends AbstractValidator
8 7
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
      */
171 171
     public function uri(array $options = [])
172 172
     {
173
-        return $this->add(function ($value, $nameKey) use($options) {
173
+        return $this->add(function($value, $nameKey) use($options) {
174 174
             if (!filter_var($value, FILTER_VALIDATE_URL)) {
175 175
                 return $this->createError('string.uri', $value, $nameKey);
176 176
             }
Please login to merge, or discard this patch.
src/Comfort.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     public function __call($name, $arguments)
26 26
     {
27
-        switch($name) {
27
+        switch ($name) {
28 28
             case 'array':
29 29
                 return new ArrayValidator($this);
30 30
             case 'string':
Please login to merge, or discard this patch.
src/Validator/AbstractMethod.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,9 @@
 block discarded – undo
19 19
             }
20 20
 
21 21
             $method = 'set' . ucfirst($option);
22
-            if (!method_exists($this, $method))
23
-                throw new \InvalidArgumentException('Option ' . $optionName . ' is not accepted');
22
+            if (!method_exists($this, $method)) {
23
+                            throw new \InvalidArgumentException('Option ' . $optionName . ' is not accepted');
24
+            }
24 25
 
25 26
             call_user_func(array($this, $method), $value);
26 27
         }
Please login to merge, or discard this patch.
src/Validator/StringValidator/UriMethod.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
         try {
25 25
             $url = $parser->parseUrl($value);
26
-        }catch(\InvalidArgumentException $e) {
26
+        }catch (\InvalidArgumentException $e) {
27 27
             return false;
28 28
         }
29 29
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
         try {
25 25
             $url = $parser->parseUrl($value);
26
-        }catch(\InvalidArgumentException $e) {
26
+        } catch(\InvalidArgumentException $e) {
27 27
             return false;
28 28
         }
29 29
 
Please login to merge, or discard this patch.
src/Validator/DateValidator.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,10 +62,10 @@
 block discarded – undo
62 62
      */
63 63
     public function timestamp()
64 64
     {
65
-        return $this->add(function ($value, $nameKey) {
65
+        return $this->add(function($value, $nameKey) {
66 66
             try {
67 67
                 new \DateTime('@' . $value);
68
-            }catch(\Exception $e) {
68
+            }catch (\Exception $e) {
69 69
                 return $this->createError('date.timestamp', $value, $nameKey);
70 70
             }
71 71
         });
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         return $this->add(function ($value, $nameKey) {
66 66
             try {
67 67
                 new \DateTime('@' . $value);
68
-            }catch(\Exception $e) {
68
+            } catch(\Exception $e) {
69 69
                 return $this->createError('date.timestamp', $value, $nameKey);
70 70
             }
71 71
         });
Please login to merge, or discard this patch.
src/Validator/AbstractValidator.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
             } while (next($this->validationStack));
73 73
 
74 74
             return $value;
75
-        }catch(ValidationException $validationException) {
75
+        }catch (ValidationException $validationException) {
76 76
             if ($this->toBool) {
77 77
                 return false;
78 78
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
             } while (next($this->validationStack));
73 73
 
74 74
             return $value;
75
-        }catch(ValidationException $validationException) {
75
+        } catch(ValidationException $validationException) {
76 76
             if ($this->toBool) {
77 77
                 return false;
78 78
             }
Please login to merge, or discard this patch.