Passed
Push — develop ( dd1d01...9e310a )
by nguereza
10:33
created
src/RuleInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@
 block discarded – undo
50 50
  * A generic Rule that asserts whether the given validation
51 51
  * data is valid or not.
52 52
  */
53
-interface RuleInterface
54
-{
53
+interface RuleInterface {
55 54
     /**
56 55
      * Method to validate this Rule
57 56
      *
Please login to merge, or discard this patch.
src/Rule/Password.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
             'lowercase' => false,
85 85
             'number' => false,
86 86
             'special_chars' => false,
87
-           ], $rules);
87
+            ], $rules);
88 88
     }
89 89
 
90 90
     /**
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,25 +105,25 @@
 block discarded – undo
105 105
             return false;
106 106
         }
107 107
 
108
-        if ($rules['uppercase'] && ((bool)preg_match('~[A-Z]~', $value)) === false) {
108
+        if ($rules['uppercase'] && ((bool) preg_match('~[A-Z]~', $value)) === false) {
109 109
             $this->errorType = self::ERROR_TYPE_UPPERCASE;
110 110
 
111 111
             return false;
112 112
         }
113 113
 
114
-        if ($rules['lowercase'] && ((bool)preg_match('~[a-z]~', $value)) === false) {
114
+        if ($rules['lowercase'] && ((bool) preg_match('~[a-z]~', $value)) === false) {
115 115
             $this->errorType = self::ERROR_TYPE_LOWERCASE;
116 116
 
117 117
             return false;
118 118
         }
119 119
 
120
-        if ($rules['number'] && ((bool)preg_match('~[0-9]~', $value)) === false) {
120
+        if ($rules['number'] && ((bool) preg_match('~[0-9]~', $value)) === false) {
121 121
             $this->errorType = self::ERROR_TYPE_NUMBER;
122 122
 
123 123
             return false;
124 124
         }
125 125
 
126
-        if ($rules['special_chars'] && ((bool)preg_match('~[^\w]~', $value)) === false) {
126
+        if ($rules['special_chars'] && ((bool) preg_match('~[^\w]~', $value)) === false) {
127 127
             $this->errorType = self::ERROR_TYPE_SPECIAL_CHAR;
128 128
 
129 129
             return false;
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
  * @class Password
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class Password implements RuleInterface
57
-{
56
+class Password implements RuleInterface {
58 57
     /*
59 58
      * The error type list
60 59
      */
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
      * Constructor
75 74
      * @param array<string, bool|int> $rules
76 75
      */
77
-    public function __construct(protected array $rules = [])
78
-    {
76
+    public function __construct(protected array $rules = []) {
79 77
         $this->rules = array_merge([
80 78
             'length' => 5,
81 79
             'uppercase' => false,
Please login to merge, or discard this patch.
src/Exception/ValidatorException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
38 38
  * @class ValidatorException
39 39
  * @package Platine\Validator\Exception
40 40
  */
41
-class ValidatorException extends Exception
42
-{
41
+class ValidatorException extends Exception {
43 42
 }
Please login to merge, or discard this patch.
src/Rule/AlphaNumericDash.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * @class AlphaNumericDash
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class AlphaNumericDash implements RuleInterface
57
-{
56
+class AlphaNumericDash implements RuleInterface {
58 57
     /**
59 58
      * String pattern to allow
60 59
      * @var string
Please login to merge, or discard this patch.
src/Rule/Natural.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * @class Natural
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class Natural implements RuleInterface
57
-{
56
+class Natural implements RuleInterface {
58 57
     /**
59 58
      * {@inheritdoc}
60 59
      * @see RuleInterface
Please login to merge, or discard this patch.
src/Rule/IP.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * @class IP
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class IP implements RuleInterface
57
-{
56
+class IP implements RuleInterface {
58 57
     /**
59 58
      * {@inheritdoc}
60 59
      * @see RuleInterface
Please login to merge, or discard this patch.
src/Rule/URL.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * @class URL
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class URL implements RuleInterface
57
-{
56
+class URL implements RuleInterface {
58 57
     /**
59 58
      * {@inheritdoc}
60 59
      * @see RuleInterface
Please login to merge, or discard this patch.
src/Rule/Alpha.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * @class Alpha
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class Alpha implements RuleInterface
57
-{
56
+class Alpha implements RuleInterface {
58 57
     /**
59 58
      * String pattern to allow
60 59
      * @var string
Please login to merge, or discard this patch.
src/Rule/IPv4.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * @class IPv4
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class IPv4 implements RuleInterface
57
-{
56
+class IPv4 implements RuleInterface {
58 57
     /**
59 58
      * {@inheritdoc}
60 59
      * @see RuleInterface
Please login to merge, or discard this patch.