@@ -113,11 +113,7 @@ public function __construct($connection = null, $driver = null)
113113 $ this ->driver = $ driver ?? new mysqli_driver ();
114114 }
115115
116- /**
117- * @param array $connectionConfig
118- * @param string $database
119- */
120- public static function getConnectionKey (array $ connectionConfig , $ database ): string
116+ public static function getConnectionKey (array $ connectionConfig , string $ database ): string
121117 {
122118 return
123119 $ connectionConfig ['host ' ] . '| ' .
@@ -127,14 +123,9 @@ public static function getConnectionKey(array $connectionConfig, $database): str
127123 }
128124
129125 /**
130- * @param string $hostname
131- * @param string $username
132- * @param string $password
133- * @param int $port
134- *
135126 * @throws ConnectionException
136127 */
137- public function connect ($ hostname , $ username , $ password , $ port = 3306 ): static
128+ public function connect (string $ hostname , string $ username , string $ password , int $ port = 3306 ): static
138129 {
139130 $ this ->driver ->report_mode = MYSQLI_REPORT_STRICT ;
140131
@@ -168,11 +159,9 @@ public function close(): static
168159 }
169160
170161 /**
171- * @param string $charset
172- * @return void
173162 * @throws DriverException
174163 */
175- public function setCharset ($ charset ): void
164+ public function setCharset (string $ charset ): void
176165 {
177166 if ($ this ->currentCharset === $ charset ) {
178167 return ;
@@ -195,23 +184,17 @@ public function setLogger(?DriverLoggerInterface $logger = null): static
195184 return $ this ;
196185 }
197186
198- /**
199- * @param string $name
200- * @return $this
201- */
202- public function setName ($ name ): static
187+ public function setName (string $ name ): static
203188 {
204- $ this ->name = ( string ) $ name ;
189+ $ this ->name = $ name ;
205190
206191 return $ this ;
207192 }
208193
209194 /**
210- * @param string $database
211- * @return $this
212195 * @throws DatabaseException
213196 */
214- public function setDatabase ($ database ): static
197+ public function setDatabase (string $ database ): static
215198 {
216199 if ($ this ->currentDatabase === $ database ) {
217200 return $ this ;
@@ -290,9 +273,8 @@ function (array $match) use ($params) {
290273
291274 /**
292275 * Quote value according to the type of variable
293- * @param mixed $value
294276 */
295- protected function quoteValue ($ value ): string | int | float
277+ protected function quoteValue (mixed $ value ): string | int | float
296278 {
297279 return match (\gettype ($ value )) {
298280 "boolean " => (int ) $ value ,
0 commit comments