Maurits van der Schee 5 years ago
parent
commit
95021afbb8
3 changed files with 6 additions and 6 deletions
  1. 3
    3
      api.php
  2. 1
    1
      src/Tqdev/PhpCrudApi/Config.php
  3. 2
    2
      src/Tqdev/PhpCrudApi/Database/GenericDB.php

+ 3
- 3
api.php View File

@@ -3466,7 +3466,7 @@ class GenericDB
3466 3466
     private $columns;
3467 3467
     private $converter;
3468 3468
 
3469
-    private function getDsn(string $address, string $port = null, string $database = null): string
3469
+    private function getDsn(string $address, string $port, string $database): string
3470 3470
     {
3471 3471
         switch ($this->driver) {
3472 3472
             case 'mysql':return "$this->driver:host=$address;port=$port;dbname=$database;charset=utf8mb4";
@@ -3514,7 +3514,7 @@ class GenericDB
3514 3514
         }
3515 3515
     }
3516 3516
 
3517
-    public function __construct(string $driver, string $address, string $port = null, string $database = null, string $username = null, string $password = null)
3517
+    public function __construct(string $driver, string $address, string $port, string $database, string $username, string $password)
3518 3518
     {
3519 3519
         $this->driver = $driver;
3520 3520
         $this->database = $database;
@@ -7200,7 +7200,7 @@ class Config
7200 7200
         return $this->values['cacheTime'];
7201 7201
     }
7202 7202
 
7203
-    public function getDebug(): string
7203
+    public function getDebug(): bool
7204 7204
     {
7205 7205
         return $this->values['debug'];
7206 7206
     }

+ 1
- 1
src/Tqdev/PhpCrudApi/Config.php View File

@@ -147,7 +147,7 @@ class Config
147 147
         return $this->values['cacheTime'];
148 148
     }
149 149
 
150
-    public function getDebug(): string
150
+    public function getDebug(): bool
151 151
     {
152 152
         return $this->values['debug'];
153 153
     }

+ 2
- 2
src/Tqdev/PhpCrudApi/Database/GenericDB.php View File

@@ -17,7 +17,7 @@ class GenericDB
17 17
     private $columns;
18 18
     private $converter;
19 19
 
20
-    private function getDsn(string $address, string $port = null, string $database = null): string
20
+    private function getDsn(string $address, string $port, string $database): string
21 21
     {
22 22
         switch ($this->driver) {
23 23
             case 'mysql':return "$this->driver:host=$address;port=$port;dbname=$database;charset=utf8mb4";
@@ -65,7 +65,7 @@ class GenericDB
65 65
         }
66 66
     }
67 67
 
68
-    public function __construct(string $driver, string $address, string $port = null, string $database = null, string $username = null, string $password = null)
68
+    public function __construct(string $driver, string $address, string $port, string $database, string $username, string $password)
69 69
     {
70 70
         $this->driver = $driver;
71 71
         $this->database = $database;

Loading…
Cancel
Save