| Total Complexity | 8 |
| Total Lines | 80 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class easySQL { |
||
| 7 | private array $settings = [ |
||
| 8 | 'type' => dbTypes::MYSQL, |
||
| 9 | ]; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @param string $host |
||
| 13 | * |
||
| 14 | * @return $this |
||
| 15 | */ |
||
| 16 | public function setHost (string $host): self { |
||
| 17 | $this->settings['host'] = $host; |
||
| 18 | return $this; |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param string $port |
||
| 23 | * |
||
| 24 | * @return $this |
||
| 25 | */ |
||
| 26 | public function setPort (string $port): self { |
||
| 27 | $this->settings['port'] = $port; |
||
| 28 | return $this; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param string $user |
||
| 33 | * |
||
| 34 | * @return $this |
||
| 35 | */ |
||
| 36 | public function setUsername (string $user): self { |
||
| 37 | $this->settings['user'] = $user; |
||
| 38 | return $this; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param string $pass |
||
| 43 | * |
||
| 44 | * @return $this |
||
| 45 | */ |
||
| 46 | public function setPassword (string $pass): self { |
||
| 47 | $this->settings['pass'] = $pass; |
||
| 48 | return $this; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param string $dbname |
||
| 53 | * |
||
| 54 | * @return $this |
||
| 55 | */ |
||
| 56 | public function setDBName (string $dbname): self { |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @param bool $auto_process |
||
| 63 | * |
||
| 64 | * @return $this |
||
| 65 | */ |
||
| 66 | public function setAutoProcess (bool $auto_process): self { |
||
| 67 | $this->settings['auto_process'] = $auto_process; |
||
| 68 | return $this; |
||
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @param bool $auto_load |
||
| 73 | * |
||
| 74 | * @return $this |
||
| 75 | */ |
||
| 76 | public function setAutoLoad (bool $auto_load): self { |
||
| 77 | $this->settings['auto_load'] = $auto_load; |
||
| 78 | return $this; |
||
| 79 | } |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @return array |
||
| 83 | */ |
||
| 84 | public function getSettings (): array { |
||
| 86 | } |
||
| 87 | } |