Skip to content

Commit

Permalink
Remove unwanted colon in code samples
Browse files Browse the repository at this point in the history
When setParameter{s,} is called, we know we are dealing with parameters.
It makes sense that this colon is unneeded, and since it results in an
error being thrown, let us document the one true way of using that API
instead.
  • Loading branch information
greg0ire committed Nov 10, 2021
1 parent 0703eca commit 306eab3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Query/QueryBuilder.php
Expand Up @@ -405,7 +405,7 @@ public function getSQL()
* ->select('u')
* ->from('users', 'u')
* ->where('u.id = :user_id')
* ->setParameter(':user_id', 1);
* ->setParameter('user_id', 1);
* </code>
*
* @param int|string $key Parameter position or name
Expand Down Expand Up @@ -434,8 +434,8 @@ public function setParameter($key, $value, $type = null)
* ->from('users', 'u')
* ->where('u.id = :user_id1 OR u.id = :user_id2')
* ->setParameters(array(
* ':user_id1' => 1,
* ':user_id2' => 2
* 'user_id1' => 1,
* 'user_id2' => 2
* ));
* </code>
*
Expand Down

0 comments on commit 306eab3

Please sign in to comment.