@@ -58,7 +58,7 @@ |
||
58 | 58 | * |
59 | 59 | * @param Connection $dbConnection |
60 | 60 | * @param array $parameters |
61 | - * @param number $indent |
|
61 | + * @param integer $indent |
|
62 | 62 | * @param int $conditionsMode |
63 | 63 | * |
64 | 64 | * @return string |
@@ -635,6 +635,9 @@ discard block |
||
635 | 635 | }); |
636 | 636 | } |
637 | 637 | |
638 | + /** |
|
639 | + * @param \Closure $callback |
|
640 | + */ |
|
638 | 641 | private static function array_map_deep($array, $callback) |
639 | 642 | { |
640 | 643 | $new = array(); |
@@ -661,7 +664,7 @@ discard block |
||
661 | 664 | * @param array $parameters |
662 | 665 | * @param string $delimiter |
663 | 666 | * @param bool|string $wrapInBrackets |
664 | - * @param int|number $indent |
|
667 | + * @param integer $indent |
|
665 | 668 | * @param int $conditionsMode |
666 | 669 | * |
667 | 670 | * @return null|string |
@@ -33,7 +33,6 @@ |
||
33 | 33 | namespace SQLParser\Node; |
34 | 34 | |
35 | 35 | use Mouf\Database\MagicQueryException; |
36 | -use Mouf\Database\MagicQueryParserException; |
|
37 | 36 | use SQLParser\SqlRenderInterface; |
38 | 37 | use Doctrine\DBAL\Connection; |
39 | 38 | use Mouf\MoufManager; |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | if (!empty($subTree) && !isset($subTree[0])) { |
453 | 453 | $subTree = StatementFactory::toObject($subTree); |
454 | 454 | } else { |
455 | - $subTree = array_map(function ($item) { |
|
455 | + $subTree = array_map(function($item) { |
|
456 | 456 | if (is_array($item)) { |
457 | 457 | return self::toObject($item); |
458 | 458 | } else { |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | array('NOT'), |
486 | 486 | array('&&', 'AND'), |
487 | 487 | array('XOR'), |
488 | - array('||', 'OR'), ); |
|
488 | + array('||', 'OR'),); |
|
489 | 489 | |
490 | 490 | private static $OPERATOR_TO_CLASS = array( |
491 | 491 | '=' => 'SQLParser\Node\Equal', |
@@ -792,7 +792,7 @@ discard block |
||
792 | 792 | */ |
793 | 793 | public static function nodeToInstanceDescriptor($node, MoufManager $moufManager) |
794 | 794 | { |
795 | - return self::array_map_deep($node, function ($item) use ($moufManager) { |
|
795 | + return self::array_map_deep($node, function($item) use ($moufManager) { |
|
796 | 796 | if ($item instanceof NodeInterface) { |
797 | 797 | return $item->toInstanceDescriptor($moufManager); |
798 | 798 | } else { |
@@ -836,7 +836,7 @@ discard block |
||
836 | 836 | { |
837 | 837 | if (is_array($nodes)) { |
838 | 838 | $elems = array(); |
839 | - array_walk_recursive($nodes, function ($item) use (&$elems, $dbConnection, $indent, $parameters, $conditionsMode, $extrapolateParameters) { |
|
839 | + array_walk_recursive($nodes, function($item) use (&$elems, $dbConnection, $indent, $parameters, $conditionsMode, $extrapolateParameters) { |
|
840 | 840 | if ($item instanceof SqlRenderInterface) { |
841 | 841 | $itemSql = $item->toSql($parameters, $dbConnection, $indent, $conditionsMode, $extrapolateParameters); |
842 | 842 | 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); |
@@ -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"; |
@@ -58,7 +58,7 @@ |
||
58 | 58 | * |
59 | 59 | * @param Connection $dbConnection |
60 | 60 | * @param array $parameters |
61 | - * @param number $indent |
|
61 | + * @param integer $indent |
|
62 | 62 | * @param int $conditionsMode |
63 | 63 | * |
64 | 64 | * @return string |
@@ -58,7 +58,7 @@ |
||
58 | 58 | * |
59 | 59 | * @param Connection $dbConnection |
60 | 60 | * @param array $parameters |
61 | - * @param number $indent |
|
61 | + * @param integer $indent |
|
62 | 62 | * @param int $conditionsMode |
63 | 63 | * |
64 | 64 | * @return string |
@@ -58,7 +58,7 @@ |
||
58 | 58 | * |
59 | 59 | * @param Connection $dbConnection |
60 | 60 | * @param array $parameters |
61 | - * @param number $indent |
|
61 | + * @param integer $indent |
|
62 | 62 | * @param int $conditionsMode |
63 | 63 | * |
64 | 64 | * @return string |
@@ -316,7 +316,7 @@ |
||
316 | 316 | * |
317 | 317 | * @param array $parameters |
318 | 318 | * @param Connection $dbConnection |
319 | - * @param int|number $indent |
|
319 | + * @param integer $indent |
|
320 | 320 | * @param int $conditionsMode |
321 | 321 | * |
322 | 322 | * @return string |
@@ -316,7 +316,7 @@ |
||
316 | 316 | * |
317 | 317 | * @param array $parameters |
318 | 318 | * @param Connection $dbConnection |
319 | - * @param int|number $indent |
|
319 | + * @param integer $indent |
|
320 | 320 | * @param int $conditionsMode |
321 | 321 | * |
322 | 322 | * @return string |