@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | if (!empty($subTree) && !isset($subTree[0])) { |
336 | 336 | $subTree = StatementFactory::toObject($subTree); |
337 | 337 | } else { |
338 | - $subTree = array_map(function ($item) { |
|
338 | + $subTree = array_map(function($item) { |
|
339 | 339 | if (is_array($item)) { |
340 | 340 | return self::toObject($item); |
341 | 341 | } else { |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | array('NOT'), |
366 | 366 | array('&&', 'AND'), |
367 | 367 | array('XOR'), |
368 | - array('||', 'OR'), ); |
|
368 | + array('||', 'OR'),); |
|
369 | 369 | |
370 | 370 | private static $OPERATOR_TO_CLASS = array( |
371 | 371 | '=' => 'SQLParser\Node\Equal', |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | { |
627 | 627 | $instanceDescriptor = $moufManager->createInstance(get_called_class()); |
628 | 628 | |
629 | - return self::array_map_deep($node, function ($item) use ($moufManager) { |
|
629 | + return self::array_map_deep($node, function($item) use ($moufManager) { |
|
630 | 630 | if ($item instanceof NodeInterface) { |
631 | 631 | return $item->toInstanceDescriptor($moufManager); |
632 | 632 | } else { |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | { |
671 | 671 | if (is_array($nodes)) { |
672 | 672 | $elems = array(); |
673 | - array_walk_recursive($nodes, function ($item) use (&$elems, $dbConnection, $indent, $delimiter, $parameters, $conditionsMode) { |
|
673 | + array_walk_recursive($nodes, function($item) use (&$elems, $dbConnection, $indent, $delimiter, $parameters, $conditionsMode) { |
|
674 | 674 | if ($item instanceof SqlRenderInterface) { |
675 | 675 | $itemSql = $item->toSql($parameters, $dbConnection, $indent, $conditionsMode); |
676 | 676 | if ($itemSql !== null) { |
@@ -48,7 +48,7 @@ |
||
48 | 48 | if (isset($desc['SELECT'])) { |
49 | 49 | $select = new Select(); |
50 | 50 | |
51 | - $columns = array_map(function ($item) { |
|
51 | + $columns = array_map(function($item) { |
|
52 | 52 | return NodeFactory::toObject($item); |
53 | 53 | }, $desc['SELECT']); |
54 | 54 | $columns = NodeFactory::simplify($columns); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | if (isset($parameters[$this->name])) { |
165 | 165 | if ($dbConnection) { |
166 | 166 | if (is_array($parameters[$this->name])) { |
167 | - return '('.implode(',', array_map(function ($item) use ($dbConnection) { |
|
167 | + return '('.implode(',', array_map(function($item) use ($dbConnection) { |
|
168 | 168 | return $dbConnection->quote($this->autoPrepend.$item.$this->autoAppend); |
169 | 169 | }, $parameters[$this->name])).')'; |
170 | 170 | } else { |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | return 'null'; |
176 | 176 | } else { |
177 | 177 | if (is_array($parameters[$this->name])) { |
178 | - return '('.implode(',', array_map(function ($item) { |
|
178 | + return '('.implode(',', array_map(function($item) { |
|
179 | 179 | return "'".addslashes($this->autoPrepend.$item.$this->autoAppend)."'"; |
180 | 180 | }, $parameters[$this->name])).')'; |
181 | 181 | } else { |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | // Default escaper will throw an exception. This is because we want to use SQL parameters instead of Twig. |
29 | 29 | // This ahs a number of advantages, especially in terms of caching. |
30 | - $twig->getExtension('core')->setEscaper('sql', function () { |
|
30 | + $twig->getExtension('core')->setEscaper('sql', function() { |
|
31 | 31 | throw new ForbiddenTwigParameterInSqlException('You cannot use Twig expressions (like "{{ id }}"). Instead, you should use SQL parameters (like ":id"). Twig integration is limited to Twig statements (like "{% for .... %}"'); |
32 | 32 | }); |
33 | 33 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | $rightOperand = $this->getRightOperand(); |
27 | 27 | if ($rightOperand instanceof Parameter) { |
28 | 28 | if (!isset($parameters[$rightOperand->getName()])) { |
29 | - throw new MagicQueryException("Missing parameter '" . $rightOperand->getName() . "' for 'IN' operand."); |
|
29 | + throw new MagicQueryException("Missing parameter '".$rightOperand->getName()."' for 'IN' operand."); |
|
30 | 30 | } |
31 | 31 | if ($parameters[$rightOperand->getName()] === []) { |
32 | 32 | return "FALSE"; |