Passed
Push — develop ( d90dee...8d2d50 )
by nguereza
01:46
created
src/Rule/URL.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@
 block discarded – undo
49 49
 use Platine\Validator\RuleInterface;
50 50
 use Platine\Validator\Validator;
51 51
 
52
-class URL implements RuleInterface
53
-{
52
+class URL implements RuleInterface {
54 53
     /**
55 54
      * {@inheritdoc}
56 55
      * @see RuleInterface
Please login to merge, or discard this patch.
src/Rule/Min.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@  discard block
 block discarded – undo
49 49
 use Platine\Validator\RuleInterface;
50 50
 use Platine\Validator\Validator;
51 51
 
52
-class Min implements RuleInterface
53
-{
52
+class Min implements RuleInterface {
54 53
     /**
55 54
      * Value to compare against
56 55
      * @var mixed
@@ -61,8 +60,7 @@  discard block
 block discarded – undo
61 60
      * Constructor
62 61
      * @param mixed $value the value to compare against
63 62
      */
64
-    public function __construct($value)
65
-    {
63
+    public function __construct($value) {
66 64
         $this->value = $value;
67 65
     }
68 66
 
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
@@ -49,8 +49,7 @@
 block discarded – undo
49 49
 use Platine\Validator\RuleInterface;
50 50
 use Platine\Validator\Validator;
51 51
 
52
-class AlphaNumericDash implements RuleInterface
53
-{
52
+class AlphaNumericDash implements RuleInterface {
54 53
     /**
55 54
      * String pattern to allow
56 55
      * @var string
Please login to merge, or discard this patch.
src/Rule/NotEqual.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@  discard block
 block discarded – undo
49 49
 use Platine\Validator\RuleInterface;
50 50
 use Platine\Validator\Validator;
51 51
 
52
-class NotEqual implements RuleInterface
53
-{
52
+class NotEqual implements RuleInterface {
54 53
     /**
55 54
      * Value to compare against
56 55
      * @var mixed
@@ -61,8 +60,7 @@  discard block
 block discarded – undo
61 60
      * Constructor
62 61
      * @param mixed $value the value to compare against
63 62
      */
64
-    public function __construct($value)
65
-    {
63
+    public function __construct($value) {
66 64
         $this->value = $value;
67 65
     }
68 66
 
Please login to merge, or discard this patch.
src/Rule/MaxLength.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@  discard block
 block discarded – undo
49 49
 use Platine\Validator\RuleInterface;
50 50
 use Platine\Validator\Validator;
51 51
 
52
-class MaxLength implements RuleInterface
53
-{
52
+class MaxLength implements RuleInterface {
54 53
     /**
55 54
      * The length
56 55
      * @var int
@@ -61,8 +60,7 @@  discard block
 block discarded – undo
61 60
      * Constructor
62 61
      * @param int $length
63 62
      */
64
-    public function __construct(int $length)
65
-    {
63
+    public function __construct(int $length) {
66 64
         $this->length = $length;
67 65
     }
68 66
 
Please login to merge, or discard this patch.
src/Rule/Date.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@  discard block
 block discarded – undo
49 49
 use Platine\Validator\RuleInterface;
50 50
 use Platine\Validator\Validator;
51 51
 
52
-class Date implements RuleInterface
53
-{
52
+class Date implements RuleInterface {
54 53
     /**
55 54
      * The date format to validate
56 55
      * @var string
@@ -61,8 +60,7 @@  discard block
 block discarded – undo
61 60
      * Constructor
62 61
      * @param string $format the date format
63 62
      */
64
-    public function __construct(string $format)
65
-    {
63
+    public function __construct(string $format) {
66 64
         $this->format = $format;
67 65
     }
68 66
 
Please login to merge, or discard this patch.
src/Rule/MinLength.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@  discard block
 block discarded – undo
49 49
 use Platine\Validator\RuleInterface;
50 50
 use Platine\Validator\Validator;
51 51
 
52
-class MinLength implements RuleInterface
53
-{
52
+class MinLength implements RuleInterface {
54 53
     /**
55 54
      * The length
56 55
      * @var int
@@ -61,8 +60,7 @@  discard block
 block discarded – undo
61 60
      * Constructor
62 61
      * @param int $length
63 62
      */
64
-    public function __construct(int $length)
65
-    {
63
+    public function __construct(int $length) {
66 64
         $this->length = $length;
67 65
     }
68 66
 
Please login to merge, or discard this patch.
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/DateBefore.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
     public function getErrorMessage(string $field, $value, Validator $validator): string
95 95
     {
96 96
         if($this->include){
97
-           return $validator->translate(
97
+            return $validator->translate(
98 98
                 '%s must be before or equal to the date [%s]!',
99 99
                 $validator->getLabel($field),
100 100
                 $this->date
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
      */
94 94
     public function getErrorMessage(string $field, $value, Validator $validator): string
95 95
     {
96
-        if($this->include){
96
+        if ($this->include) {
97 97
            return $validator->translate(
98 98
                 '%s must be before or equal to the date [%s]!',
99 99
                 $validator->getLabel($field),
Please login to merge, or discard this patch.
Braces   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@  discard block
 block discarded – undo
49 49
 use Platine\Validator\RuleInterface;
50 50
 use Platine\Validator\Validator;
51 51
 
52
-class DateBefore implements RuleInterface
53
-{
52
+class DateBefore implements RuleInterface {
54 53
     /**
55 54
      * The date to compare against
56 55
      * @var string
@@ -68,8 +67,7 @@  discard block
 block discarded – undo
68 67
      * @param string $date the date format
69 68
      * @param bool $include
70 69
      */
71
-    public function __construct(string $date, bool $include = false)
72
-    {
70
+    public function __construct(string $date, bool $include = false) {
73 71
         $this->date = $date;
74 72
         $this->include = $include;
75 73
     }
@@ -93,7 +91,7 @@  discard block
 block discarded – undo
93 91
      */
94 92
     public function getErrorMessage(string $field, $value, Validator $validator): string
95 93
     {
96
-        if($this->include){
94
+        if($this->include) {
97 95
            return $validator->translate(
98 96
                 '%s must be before or equal to the date [%s]!',
99 97
                 $validator->getLabel($field),
Please login to merge, or discard this patch.