| Total Complexity | 10 |
| Total Lines | 115 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class Config extends ConfigurationOption |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | protected $host = '127.0.0.1'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var int |
||
| 22 | */ |
||
| 23 | protected $port; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | protected $username; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var string |
||
| 32 | */ |
||
| 33 | protected $password; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @var string |
||
| 37 | */ |
||
| 38 | protected $bucketName = 'default'; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | public function getHost(): string |
||
| 44 | { |
||
| 45 | return $this->host; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param string $host |
||
| 50 | * @return Config |
||
| 51 | */ |
||
| 52 | public function setHost(string $host): Config |
||
| 53 | { |
||
| 54 | $this->host = $host; |
||
| 55 | return $this; |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return int|null |
||
| 60 | */ |
||
| 61 | public function getPort() |
||
| 62 | { |
||
| 63 | return $this->port; |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @param int $port |
||
| 68 | * @return Config |
||
| 69 | */ |
||
| 70 | public function setPort(int $port = null): Config |
||
| 71 | { |
||
| 72 | $this->port = $port; |
||
| 73 | return $this; |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return string |
||
| 78 | */ |
||
| 79 | public function getUsername(): string |
||
| 82 | } |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @param string $username |
||
| 86 | * @return Config |
||
| 87 | */ |
||
| 88 | public function setUsername(string $username): Config |
||
| 89 | { |
||
| 90 | $this->username = $username; |
||
| 91 | return $this; |
||
| 92 | } |
||
| 93 | |||
| 94 | /** |
||
| 95 | * @return string |
||
| 96 | */ |
||
| 97 | public function getPassword(): string |
||
| 100 | } |
||
| 101 | |||
| 102 | /** |
||
| 103 | * @param string $password |
||
| 104 | * @return Config |
||
| 105 | */ |
||
| 106 | public function setPassword(string $password): Config |
||
| 107 | { |
||
| 108 | $this->password = $password; |
||
| 109 | return $this; |
||
| 110 | } |
||
| 111 | |||
| 112 | /** |
||
| 113 | * @return string |
||
| 114 | */ |
||
| 115 | public function getBucketName(): string |
||
| 118 | } |
||
| 119 | |||
| 120 | /** |
||
| 121 | * @param string $bucketName |
||
| 122 | * @return Config |
||
| 123 | */ |
||
| 124 | public function setBucketName(string $bucketName): Config |
||
| 128 | } |
||
| 129 | } |