Passed
Push — main ( bae336...1e821c )
by Roberto
01:48
created
src/Middleware/AbstractMiddleware.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -10,22 +10,22 @@
 block discarded – undo
10 10
 
11 11
 abstract class AbstractMiddleware{
12 12
 
13
-  public BaseMatch $match;
14
-  public Request $request;
13
+    public BaseMatch $match;
14
+    public Request $request;
15 15
 
16
-  public function __construct(){  }
16
+    public function __construct(){  }
17 17
 
18
-  abstract protected function handle(mixed ...$args): HttpResponse|Request;
18
+    abstract protected function handle(mixed ...$args): HttpResponse|Request;
19 19
 
20
-  public function addMatcher(BaseMatch $match){
20
+    public function addMatcher(BaseMatch $match){
21 21
     $this->match = $match;
22
-  }
22
+    }
23 23
 
24
-  public function setRequest(Request $request){
24
+    public function setRequest(Request $request){
25 25
     $this->request = $request;
26
-  }
26
+    }
27 27
 
28
-  public function __invoke(mixed ...$args) {
28
+    public function __invoke(mixed ...$args) {
29 29
         return $this->handle(...$args);
30 30
     }
31 31
 }
32 32
\ No newline at end of file
Please login to merge, or discard this patch.
src/Exceptions/TableNameNotSetException.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 
6 6
 class TableNameNotSetException extends Exception{
7 7
 
8
-  public function __construct(\ReflectionClass $class, $message = "", $code = 0, ?\Throwable $previous = null){
8
+    public function __construct(\ReflectionClass $class, $message = "", $code = 0, ?\Throwable $previous = null){
9 9
 
10 10
     $className = $class->getName();
11 11
 
@@ -15,5 +15,5 @@  discard block
 block discarded – undo
15 15
     $this->line = $class->getStartLine();
16 16
     $this->file = $class->getFileName();
17 17
     parent::__construct($message, $code, $previous);
18
-  }
18
+    }
19 19
 }
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
src/Exceptions/MultipleFieldAttributeException.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 class MultipleFieldAttributeException extends FieldException{
9 9
 
10
-  public function __construct(\ReflectionProperty $prop, $message = "Lo", $code = 0, ?\Throwable $previous = null){
10
+    public function __construct(\ReflectionProperty $prop, $message = "Lo", $code = 0, ?\Throwable $previous = null){
11 11
 
12 12
     $propName = $prop->getName();
13 13
     $className = $prop->getDeclaringClass()->getName();
@@ -16,5 +16,5 @@  discard block
 block discarded – undo
16 16
                 "Field '$propName' of '$className' has more than one Field Attribute.";
17 17
 
18 18
     parent::__construct($prop, $message, $code, $previous);
19
-  }
19
+    }
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
src/Exceptions/MultiplePrimaryKeyException.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 class MultiplePrimaryKeyException extends FieldException{
9 9
 
10
-  public function __construct(\ReflectionProperty $prop, $message = "Lo", $code = 0, ?\Throwable $previous = null){
10
+    public function __construct(\ReflectionProperty $prop, $message = "Lo", $code = 0, ?\Throwable $previous = null){
11 11
 
12 12
     $propName = $prop->getName();
13 13
     $className = $prop->getDeclaringClass()->getName();
@@ -16,5 +16,5 @@  discard block
 block discarded – undo
16 16
                 "Field '$propName' of '$className' has more than one Primary Key.";
17 17
 
18 18
     parent::__construct($prop, $message, $code, $previous);
19
-  }
19
+    }
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
src/Exceptions/NoPrimaryKeyException.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 class NoPrimaryKeyException extends \Exception{
9 9
 
10
-  public function __construct(\ReflectionClass $class, $message = "", $code = 0, ?\Throwable $previous = null){
10
+    public function __construct(\ReflectionClass $class, $message = "", $code = 0, ?\Throwable $previous = null){
11 11
 
12 12
     $className = $class->getName();
13 13
     $this->line = $class->getStartLine();
@@ -17,5 +17,5 @@  discard block
 block discarded – undo
17 17
                 "Model '$className' has no Primary Key.";
18 18
 
19 19
     parent::__construct($message, $code, $previous);
20
-  }
20
+    }
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
src/Exceptions/InvalidFieldVisibilityKeyword.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 class InvalidFieldVisibilityKeyword extends FieldException{
9 9
 
10
- public function __construct(\ReflectionProperty $prop, $message = "", $code = 0, ?\Throwable $previous = null){
10
+    public function __construct(\ReflectionProperty $prop, $message = "", $code = 0, ?\Throwable $previous = null){
11 11
 
12 12
     $propName = $prop->getName();
13 13
     $className = $prop->getDeclaringClass()->getName();
@@ -16,5 +16,5 @@  discard block
 block discarded – undo
16 16
     $message =  "Invalid visibility keyword: ".
17 17
                 "Field '$propName' of '$className' set to '$modifiers', `protected` expected.";
18 18
     parent::__construct($prop, $message, $code, $previous);
19
-  }
19
+    }
20 20
 }
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
src/Exceptions/FieldException.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@
 block discarded – undo
7 7
 
8 8
 class FieldException extends Exception{
9 9
 
10
-  public function __construct(\ReflectionProperty $prop, $message = "", $code = 0, ?\Throwable $previous = null){
10
+    public function __construct(\ReflectionProperty $prop, $message = "", $code = 0, ?\Throwable $previous = null){
11 11
 
12 12
     $this->line = Functions::getDeclarationLine($prop);
13 13
     $this->file = $prop->getDeclaringClass()->getFileName();
14 14
     parent::__construct($message, $code, $previous);
15
-  }
15
+    }
16 16
 }
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
src/Boson/Model.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     /**
26 26
      * The reverse OneToMany and OneToOne relationships of the model.
27 27
      * @var array
28
-    */
28
+     */
29 29
 
30 30
     private array $reverseForeignKeys;
31 31
 
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
      * Update the data in the database using prepared queries.
494 494
      *
495 495
      * @return bool
496
-    */
496
+     */
497 497
     private function update()
498 498
     {
499 499
         $db = Application::getDb();
Please login to merge, or discard this patch.
src/Boson/DataTypes/Field.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -4,48 +4,48 @@
 block discarded – undo
4 4
 
5 5
 class Field{
6 6
 
7
-  protected array $default_error_messages = array(
7
+    protected array $default_error_messages = array(
8 8
     "invalid_choice"  => "Value %value is not a valid choice.",
9 9
     "null"            => "This field cannot be null.",
10 10
     "blank"           => "This field cannot be blank.",
11 11
     "unique"          => "A %model_name with this %field_label already exists.",
12 12
     "unique_for"      => "Field %field_label must be unique for fields with same %unique_for."
13
-  );
14
-
15
-  protected array $validation_errors = array();
16
-
17
-  public function __construct(
18
-     protected bool   $null             = false,
19
-     protected bool   $blank            = true,
20
-     protected array  $choices          = array(),
21
-     protected string $db_column        = "",
22
-     protected mixed  $default          = "",
23
-     protected bool   $editable         = true,
24
-     protected array  $error_messages   = array(),
25
-     protected string $help_text        = "",
26
-     protected bool   $primary_key      = false,
27
-     protected bool   $unique           = false,
28
-     protected string $unique_for       = "",
29
-     protected string $verbose_name     = "",
30
-     protected array  $validators       = array()
13
+    );
14
+
15
+    protected array $validation_errors = array();
16
+
17
+    public function __construct(
18
+        protected bool   $null             = false,
19
+        protected bool   $blank            = true,
20
+        protected array  $choices          = array(),
21
+        protected string $db_column        = "",
22
+        protected mixed  $default          = "",
23
+        protected bool   $editable         = true,
24
+        protected array  $error_messages   = array(),
25
+        protected string $help_text        = "",
26
+        protected bool   $primary_key      = false,
27
+        protected bool   $unique           = false,
28
+        protected string $unique_for       = "",
29
+        protected string $verbose_name     = "",
30
+        protected array  $validators       = array()
31 31
     )
32
-  {
32
+    {
33 33
     return;
34
-  }
34
+    }
35 35
 
36 36
 
37
-  protected function check(){
37
+    protected function check(){
38 38
     return true;
39
-  }
39
+    }
40 40
 
41 41
 
42 42
 
43 43
 
44
-  public function db_column(): string{
44
+    public function db_column(): string{
45 45
     return $this->db_column;
46
-  }
46
+    }
47 47
 
48
-  public function set_db_column(string $column_name): void{
48
+    public function set_db_column(string $column_name): void{
49 49
     $this->db_column = $column_name;
50
-  }
50
+    }
51 51
 }
52 52
\ No newline at end of file
Please login to merge, or discard this patch.