Skip to content

Commit

Permalink
Correct typehinting in QueryCompiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Jun 22, 2014
1 parent bff4cb8 commit e8d8280
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Database/QueryCompiler.php
Expand Up @@ -78,9 +78,11 @@ class QueryCompiler {
* Returns the SQL representation of the provided query after generating
* the placeholders for the bound values using the provided generator
*
* @return void
* @param \Cake\Database\Query $query The query that is being compiled
* @param \Cake\Database\ValueBinder $generator the placeholder generator to be used in expressions
* @return \Closure
*/
public function compile($query, $generator) {
public function compile(Query $query, ValueBinder $generator) {
$sql = '';
$type = $query->type();
$query->traverse(
Expand All @@ -95,6 +97,7 @@ public function compile($query, $generator) {
* of this query.
*
* @param string $sql initial sql string to append to
* @param \Cake\Database\Query $query The query that is being compiled
* @param \Cake\Database\ValueBinder The placeholder and value binder object
* @return \Closure
*/
Expand Down Expand Up @@ -281,7 +284,7 @@ protected function _buildValuesPart($parts, $query, $generator) {
* @param \Cake\Database\ValueBinder $generator the placeholder generator to be used in expressions
* @return array
*/
protected function _stringifyExpressions(array $expressions, ValueBinder $generator) {
protected function _stringifyExpressions($expressions, $generator) {
$result = [];
foreach ($expressions as $k => $expression) {
if ($expression instanceof ExpressionInterface) {
Expand Down

0 comments on commit e8d8280

Please sign in to comment.