Passed
Push — main ( 7f34fc...ff3d68 )
by Roberto
12:26
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/Helpers/Functions.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -3,21 +3,21 @@
 block discarded – undo
3 3
 
4 4
 class Functions{
5 5
 static function getDeclarationLine(\ReflectionProperty $prop){
6
-  $declaringClass = $prop->getDeclaringClass();
7
-  $propname = $prop->getName();
8
-  $classFile      = new \SplFileObject($declaringClass->getFileName());
9
-  foreach ($classFile as $line => $content) {
10
-      if (preg_match(
11
-          '/
6
+    $declaringClass = $prop->getDeclaringClass();
7
+    $propname = $prop->getName();
8
+    $classFile      = new \SplFileObject($declaringClass->getFileName());
9
+    foreach ($classFile as $line => $content) {
10
+        if (preg_match(
11
+            '/
12 12
               (private|protected|public|var|static) # match visibility or var
13 13
               \s                             # followed 1 whitespace
14 14
               \$'.$propname.'                          # followed by the var name $bar
15 15
           /x',
16
-          $content)
17
-      ) {
18
-          return $line + 1;
19
-      }
20
-  }
21
-  return 1;
16
+            $content)
17
+        ) {
18
+            return $line + 1;
19
+        }
20
+    }
21
+    return 1;
22 22
 }
23 23
 }
Please login to merge, or discard this patch.