@@ -187,9 +187,8 @@ final public function isConnected(): bool
187187 /**
188188 * Returns configuration variable. If no $key is passed, returns the entire array.
189189 * @see self::__construct
190- * @return mixed
191190 */
192- final public function getConfig (?string $ key = null , $ default = null )
191+ final public function getConfig (?string $ key = null , $ default = null ): mixed
193192 {
194193 return $ key === null
195194 ? $ this ->config
@@ -212,21 +211,19 @@ final public function getDriver(): Driver
212211
213212 /**
214213 * Generates (translates) and executes SQL query.
215- * @param mixed ...$args
216214 * @throws Exception
217215 */
218- final public function query (...$ args ): Result
216+ final public function query (mixed ...$ args ): Result
219217 {
220218 return $ this ->nativeQuery ($ this ->translate (...$ args ));
221219 }
222220
223221
224222 /**
225223 * Generates SQL query.
226- * @param mixed ...$args
227224 * @throws Exception
228225 */
229- final public function translate (...$ args ): string
226+ final public function translate (mixed ...$ args ): string
230227 {
231228 if (!$ this ->driver ) {
232229 $ this ->connect ();
@@ -238,9 +235,8 @@ final public function translate(...$args): string
238235
239236 /**
240237 * Generates and prints SQL query.
241- * @param mixed ...$args
242238 */
243- final public function test (...$ args ): bool
239+ final public function test (mixed ...$ args ): bool
244240 {
245241 try {
246242 Helpers::dump ($ this ->translate (...$ args ));
@@ -260,10 +256,9 @@ final public function test(...$args): bool
260256
261257 /**
262258 * Generates (translates) and returns SQL query as DataSource.
263- * @param mixed ...$args
264259 * @throws Exception
265260 */
266- final public function dataSource (...$ args ): DataSource
261+ final public function dataSource (mixed ...$ args ): DataSource
267262 {
268263 return new DataSource ($ this ->translate (...$ args ), $ this );
269264 }
@@ -426,10 +421,7 @@ public function rollback(?string $savepoint = null): void
426421 }
427422
428423
429- /**
430- * @return mixed
431- */
432- public function transaction (callable $ callback )
424+ public function transaction (callable $ callback ): mixed
433425 {
434426 if ($ this ->transactionDepth === 0 ) {
435427 $ this ->begin ();
@@ -535,45 +527,40 @@ public function substitute(string $value): string
535527
536528 /**
537529 * Executes SQL query and fetch result - shortcut for query() & fetch().
538- * @param mixed ...$args
539530 * @throws Exception
540531 */
541- public function fetch (...$ args ): ?Row
532+ public function fetch (mixed ...$ args ): ?Row
542533 {
543534 return $ this ->query ($ args )->fetch ();
544535 }
545536
546537
547538 /**
548539 * Executes SQL query and fetch results - shortcut for query() & fetchAll().
549- * @param mixed ...$args
550540 * @return Row[]|array[]
551541 * @throws Exception
552542 */
553- public function fetchAll (...$ args ): array
543+ public function fetchAll (mixed ...$ args ): array
554544 {
555545 return $ this ->query ($ args )->fetchAll ();
556546 }
557547
558548
559549 /**
560550 * Executes SQL query and fetch first column - shortcut for query() & fetchSingle().
561- * @param mixed ...$args
562- * @return mixed
563551 * @throws Exception
564552 */
565- public function fetchSingle (...$ args )
553+ public function fetchSingle (mixed ...$ args ): mixed
566554 {
567555 return $ this ->query ($ args )->fetchSingle ();
568556 }
569557
570558
571559 /**
572560 * Executes SQL query and fetch pairs - shortcut for query() & fetchPairs().
573- * @param mixed ...$args
574561 * @throws Exception
575562 */
576- public function fetchPairs (...$ args ): array
563+ public function fetchPairs (mixed ...$ args ): array
577564 {
578565 return $ this ->query ($ args )->fetchPairs ();
579566 }
0 commit comments