Passed
Push — develop ( dd1d01...9e310a )
by nguereza
10:33
created
src/Rule/Max.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      * Constructor
60 60
      * @param string|float|int|bool|null $value the value to compare against
61 61
      */
62
-    public function __construct(protected string|float|int|bool|null $value)
62
+    public function __construct(protected string | float | int | bool | null $value)
63 63
     {
64 64
         $this->value = $value;
65 65
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,14 +53,12 @@
 block discarded – undo
53 53
  * @class Max
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class Max implements RuleInterface
57
-{
56
+class Max implements RuleInterface {
58 57
     /**
59 58
      * Constructor
60 59
      * @param string|float|int|bool|null $value the value to compare against
61 60
      */
62
-    public function __construct(protected string|float|int|bool|null $value)
63
-    {
61
+    public function __construct(protected string|float|int|bool|null $value) {
64 62
         $this->value = $value;
65 63
     }
66 64
 
Please login to merge, or discard this patch.
src/Rule/Range.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,8 @@
 block discarded – undo
61 61
      * @param string|float|int|bool|null $max the maximum value to compare against
62 62
      */
63 63
     public function __construct(
64
-        protected string|float|int|bool|null $min,
65
-        protected string|float|int|bool|null $max
64
+        protected string | float | int | bool | null $min,
65
+        protected string | float | int | bool | null $max
66 66
     ) {
67 67
         $this->min = $min;
68 68
         $this->max = $max;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * @class Range
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class Range implements RuleInterface
57
-{
56
+class Range implements RuleInterface {
58 57
     /**
59 58
      * Constructor
60 59
      * @param string|float|int|bool|null $min the minimum value to compare against
Please login to merge, or discard this patch.
src/Rule/InList.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,14 +53,12 @@
 block discarded – undo
53 53
  * @class InList
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class InList implements RuleInterface
57
-{
56
+class InList implements RuleInterface {
58 57
     /**
59 58
      * Constructor
60 59
      * @param array<mixed> $list The list to match
61 60
      */
62
-    public function __construct(protected array $list)
63
-    {
61
+    public function __construct(protected array $list) {
64 62
         $this->list = $list;
65 63
     }
66 64
 
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
@@ -53,14 +53,12 @@
 block discarded – undo
53 53
  * @class Date
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class Date implements RuleInterface
57
-{
56
+class Date implements RuleInterface {
58 57
     /**
59 58
      * Constructor
60 59
      * @param string $format the date format to validate
61 60
      */
62
-    public function __construct(protected string $format = 'Y-m-d')
63
-    {
61
+    public function __construct(protected string $format = 'Y-m-d') {
64 62
         $this->format = $format;
65 63
     }
66 64
 
Please login to merge, or discard this patch.
src/Rule/Regex.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
             return true;
75 75
         }
76 76
 
77
-        return (bool) preg_match($this->regex, (string)$value);
77
+        return (bool) preg_match($this->regex, (string) $value);
78 78
     }
79 79
 
80 80
     /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,14 +53,12 @@
 block discarded – undo
53 53
  * @class Regex
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class Regex implements RuleInterface
57
-{
56
+class Regex implements RuleInterface {
58 57
     /**
59 58
      * Constructor
60 59
      * @param string $regex the regex pattern
61 60
      */
62
-    public function __construct(protected string $regex)
63
-    {
61
+    public function __construct(protected string $regex) {
64 62
         $this->regex = $regex;
65 63
     }
66 64
 
Please login to merge, or discard this patch.
src/Rule/Equal.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,14 +53,12 @@
 block discarded – undo
53 53
  * @class Equal
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class Equal implements RuleInterface
57
-{
56
+class Equal implements RuleInterface {
58 57
     /**
59 58
      * Constructor
60 59
      * @param mixed $value the value to compare against
61 60
      */
62
-    public function __construct(protected mixed $value)
63
-    {
61
+    public function __construct(protected mixed $value) {
64 62
         $this->value = $value;
65 63
     }
66 64
 
Please login to merge, or discard this patch.
src/Rule/DateAfter.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,15 +53,13 @@
 block discarded – undo
53 53
  * @class DateAfter
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class DateAfter implements RuleInterface
57
-{
56
+class DateAfter implements RuleInterface {
58 57
     /**
59 58
      * Constructor
60 59
      * @param string $date the date format to compare against
61 60
      * @param bool $include whether the given date is included or not
62 61
      */
63
-    public function __construct(protected string $date, protected bool $include = false)
64
-    {
62
+    public function __construct(protected string $date, protected bool $include = false) {
65 63
         $this->date = $date;
66 64
         $this->include = $include;
67 65
     }
Please login to merge, or discard this patch.
src/Rule/DateBefore.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,15 +53,13 @@
 block discarded – undo
53 53
  * @class DateBefore
54 54
  * @package Platine\Validator\Rule
55 55
  */
56
-class DateBefore implements RuleInterface
57
-{
56
+class DateBefore implements RuleInterface {
58 57
     /**
59 58
      * Constructor
60 59
      * @param string $date the date format to compare against
61 60
      * @param bool $include whether the given date is included or not
62 61
      */
63
-    public function __construct(protected string $date, protected bool $include = false)
64
-    {
62
+    public function __construct(protected string $date, protected bool $include = false) {
65 63
         $this->date = $date;
66 64
         $this->include = $include;
67 65
     }
Please login to merge, or discard this patch.
src/Validator.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
56 56
  * associated metadata for ensuring that a given data set
57 57
  * is valid and returned correctly.
58 58
  */
59
-class Validator
60
-{
59
+class Validator {
61 60
     /**
62 61
      * The data to validate
63 62
      * @var array<string, mixed>
Please login to merge, or discard this patch.