Passed
Push — main ( 7064c3...9debc3 )
by BRUNO
02:38
created
src/DatabaseException.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
 
20 20
     public function __construct(
21 21
         string $message,
22
-        int|string $code = 0,  // ✅ Aceita int ou string
22
+        int | string $code = 0, // ✅ Aceita int ou string
23 23
         ?Throwable $previous = null,
24 24
         ?string $query = null,
25 25
         ?array $parameters = null
26 26
     ) {
27 27
         // ✅ Converte string para int de forma segura
28
-        $intCode = is_string($code) ? (int)$code : $code;
28
+        $intCode = is_string($code) ? (int) $code : $code;
29 29
         if ($intCode === 0 && is_string($code) && !empty($code)) {
30 30
             // Se a conversão resultou em 0 mas o código original não era vazio,
31 31
             // usa um código padrão
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     /**
62 62
      * Get original PDO error code (may be string)
63 63
      */
64
-    public function getOriginalCode(): int|string
64
+    public function getOriginalCode(): int | string
65 65
     {
66 66
         $previous = $this->getPrevious();
67 67
         return $previous ? $previous->getCode() : $this->getCode();
Please login to merge, or discard this patch.