|
17 | 17 | */ |
18 | 18 | interface ConnectionServiceInterface |
19 | 19 | { |
20 | | -/** |
21 | | - * Get a database connection instance. |
22 | | - * |
23 | | - * This method returns a database connection instance. |
24 | | - * |
25 | | - * @return ConnectionInterface The database connection instance. |
26 | | - * |
27 | | - * @example |
28 | | - * // Get a database connection instance. |
29 | | - * $connection = $this->get(); |
30 | | - * |
31 | | - * // Run a query on the "users" table. |
32 | | - * * $connection->table('users')->where('id', 1)->update(['name' => 'Jane']); |
33 | | - * |
34 | | - * // Start a database transaction. |
35 | | - * $connection->beginTransaction(); |
36 | | - * |
37 | | - * try { |
38 | | - * // Run queries... |
39 | | - * |
40 | | - * // Commit the transaction. |
41 | | - * $connection->commit(); |
42 | | - * } catch (Exception $e) { |
43 | | - * // Rollback the transaction. |
44 | | - * $connection->rollback(); |
45 | | - * |
46 | | - * // Rethrow the exception. |
47 | | - * throw $e; |
48 | | - * } |
49 | | - */ |
50 | | -public function get(): ConnectionInterface; |
| 20 | + /** |
| 21 | + * Get a database connection instance. |
| 22 | + * |
| 23 | + * This method returns a database connection instance. |
| 24 | + * |
| 25 | + * @return ConnectionInterface The database connection instance. |
| 26 | + * |
| 27 | + * @example |
| 28 | + * // Get a database connection instance. |
| 29 | + * $connection = $this->get(); |
| 30 | + * |
| 31 | + * // Run a query on the "users" table. |
| 32 | + * * $connection->table('users')->where('id', 1)->update(['name' => 'Jane']); |
| 33 | + * |
| 34 | + * // Start a database transaction. |
| 35 | + * $connection->beginTransaction(); |
| 36 | + * |
| 37 | + * try { |
| 38 | + * // Run queries... |
| 39 | + * |
| 40 | + * // Commit the transaction. |
| 41 | + * $connection->commit(); |
| 42 | + * } catch (Exception $e) { |
| 43 | + * // Rollback the transaction. |
| 44 | + * $connection->rollback(); |
| 45 | + * |
| 46 | + * // Rethrow the exception. |
| 47 | + * throw $e; |
| 48 | + * } |
| 49 | + */ |
| 50 | + public function get(): ConnectionInterface; |
51 | 51 | } |
0 commit comments