Skip to content

Commit bce176b

Browse files
committed
Add literal string types for prepare method
1 parent 8ad0c00 commit bce176b

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

extension.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ parameters:
1818
- stubs/DBAL/Types/Type.stub
1919
- stubs/DBAL/Exception.stub
2020
- stubs/DBAL/Result.stub
21+
- stubs/DBAL/Statement.stub
2122
- stubs/DocumentManager.stub
2223
- stubs/DocumentRepository.stub
2324
- stubs/EntityManager.stub

stubs/DBAL/Connection.stub

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ use Throwable;
1010

1111
class Connection
1212
{
13+
/**
14+
* Prepares an SQL statement.
15+
*
16+
* @param __doctrine-literal-string $sql The SQL statement to prepare.
17+
*
18+
* @throws Exception
19+
*/
20+
public function prepare(string $sql): Statement;
21+
1322
/**
1423
* Executes an SQL statement with the given parameters and returns the number of affected rows.
1524
*

stubs/DBAL/Connection4.stub

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ use Throwable;
1414
*/
1515
class Connection
1616
{
17+
/**
18+
* Prepares an SQL statement.
19+
*
20+
* @param __doctrine-literal-string $sql The SQL statement to prepare.
21+
*
22+
* @throws Exception
23+
*/
24+
public function prepare(string $sql): Statement;
25+
1726
/**
1827
* Executes an SQL statement with the given parameters and returns the number of affected rows.
1928
*

stubs/DBAL/Statement.stub

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace Doctrine\DBAL;
4+
5+
class Statement
6+
{
7+
8+
}

0 commit comments

Comments
 (0)