Skip to content

Commit 0d0b16d

Browse files
authored
[12.x] Add missing @throws annotations to Database Connection class (laravel#57452)
- Add @throws RuntimeException to escape() method - Add @throws RuntimeException to escapeBinary() method These methods throw RuntimeException when the PDO connection is not available but were missing proper @throws annotations in their docblocks.
1 parent 96e5773 commit 0d0b16d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Illuminate/Database/Connection.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,8 @@ public function raw($value)
11011101
* @param string|float|int|bool|null $value
11021102
* @param bool $binary
11031103
* @return string
1104+
*
1105+
* @throws \RuntimeException
11041106
*/
11051107
public function escape($value, $binary = false)
11061108
{
@@ -1154,6 +1156,8 @@ protected function escapeBool($value)
11541156
*
11551157
* @param string $value
11561158
* @return string
1159+
*
1160+
* @throws \RuntimeException
11571161
*/
11581162
protected function escapeBinary($value)
11591163
{

0 commit comments

Comments
 (0)