@@ -186,9 +186,8 @@ final public function isConnected(): bool
186186 /**
187187 * Returns configuration variable. If no $key is passed, returns the entire array.
188188 * @see self::__construct
189- * @return mixed
190189 */
191- final public function getConfig (string $ key = null , $ default = null )
190+ final public function getConfig (string $ key = null , $ default = null ): mixed
192191 {
193192 return $ key === null
194193 ? $ this ->config
@@ -210,21 +209,19 @@ final public function getDriver(): Driver
210209
211210 /**
212211 * Generates (translates) and executes SQL query.
213- * @param mixed ...$args
214212 * @throws Exception
215213 */
216- final public function query (...$ args ): Result
214+ final public function query (mixed ...$ args ): Result
217215 {
218216 return $ this ->nativeQuery ($ this ->translate (...$ args ));
219217 }
220218
221219
222220 /**
223221 * Generates SQL query.
224- * @param mixed ...$args
225222 * @throws Exception
226223 */
227- final public function translate (...$ args ): string
224+ final public function translate (mixed ...$ args ): string
228225 {
229226 if (!$ this ->driver ) {
230227 $ this ->connect ();
@@ -235,9 +232,8 @@ final public function translate(...$args): string
235232
236233 /**
237234 * Generates and prints SQL query.
238- * @param mixed ...$args
239235 */
240- final public function test (...$ args ): bool
236+ final public function test (mixed ...$ args ): bool
241237 {
242238 try {
243239 Helpers::dump ($ this ->translate (...$ args ));
@@ -256,10 +252,9 @@ final public function test(...$args): bool
256252
257253 /**
258254 * Generates (translates) and returns SQL query as DataSource.
259- * @param mixed ...$args
260255 * @throws Exception
261256 */
262- final public function dataSource (...$ args ): DataSource
257+ final public function dataSource (mixed ...$ args ): DataSource
263258 {
264259 return new DataSource ($ this ->translate (...$ args ), $ this );
265260 }
@@ -413,10 +408,7 @@ public function rollback(string $savepoint = null): void
413408 }
414409
415410
416- /**
417- * @return mixed
418- */
419- public function transaction (callable $ callback )
411+ public function transaction (callable $ callback ): mixed
420412 {
421413 if ($ this ->transactionDepth === 0 ) {
422414 $ this ->begin ();
@@ -520,45 +512,40 @@ public function substitute(string $value): string
520512
521513 /**
522514 * Executes SQL query and fetch result - shortcut for query() & fetch().
523- * @param mixed ...$args
524515 * @throws Exception
525516 */
526- public function fetch (...$ args ): ?Row
517+ public function fetch (mixed ...$ args ): ?Row
527518 {
528519 return $ this ->query ($ args )->fetch ();
529520 }
530521
531522
532523 /**
533524 * Executes SQL query and fetch results - shortcut for query() & fetchAll().
534- * @param mixed ...$args
535525 * @return Row[]|array[]
536526 * @throws Exception
537527 */
538- public function fetchAll (...$ args ): array
528+ public function fetchAll (mixed ...$ args ): array
539529 {
540530 return $ this ->query ($ args )->fetchAll ();
541531 }
542532
543533
544534 /**
545535 * Executes SQL query and fetch first column - shortcut for query() & fetchSingle().
546- * @param mixed ...$args
547- * @return mixed
548536 * @throws Exception
549537 */
550- public function fetchSingle (...$ args )
538+ public function fetchSingle (mixed ...$ args ): mixed
551539 {
552540 return $ this ->query ($ args )->fetchSingle ();
553541 }
554542
555543
556544 /**
557545 * Executes SQL query and fetch pairs - shortcut for query() & fetchPairs().
558- * @param mixed ...$args
559546 * @throws Exception
560547 */
561- public function fetchPairs (...$ args ): array
548+ public function fetchPairs (mixed ...$ args ): array
562549 {
563550 return $ this ->query ($ args )->fetchPairs ();
564551 }
0 commit comments