File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -340,10 +340,13 @@ public function error() : ?string
340340 * @param string $schema
341341 *
342342 * @throws mysqli_sql_exception if schema is unknown
343+ *
344+ * @return static
343345 */
344- public function use (string $ schema ) : void
346+ public function use (string $ schema ) : static
345347 {
346348 $ this ->mysqli ->select_db ($ schema );
349+ return $ this ;
347350 }
348351
349352 /**
@@ -641,8 +644,10 @@ public function prepare(#[Language('SQL')] string $statement) : PreparedStatemen
641644 *
642645 * @throws Exception if statements fail
643646 * @throws LogicException if transaction already is active
647+ *
648+ * @return static
644649 */
645- public function transaction (callable $ statements ) : void
650+ public function transaction (callable $ statements ) : static
646651 {
647652 if ($ this ->inTransaction ) {
648653 throw new LogicException ('Transaction already is active ' );
@@ -659,6 +664,7 @@ public function transaction(callable $statements) : void
659664 } finally {
660665 $ this ->inTransaction = false ;
661666 }
667+ return $ this ;
662668 }
663669
664670 /**
You can’t perform that action at this time.
0 commit comments