Completed
Pull Request — 1.3 (#56)
by David
01:31
created
src/SQLParser/Node/NodeFactory.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Doctrine\DBAL\Platforms\AbstractPlatform;
5 5
 use Mouf\Database\MagicQueryException;
6
-use Mouf\Database\MagicQueryParserException;
7 6
 use SQLParser\SqlRenderInterface;
8 7
 use Mouf\MoufManager;
9 8
 use Mouf\MoufInstanceDescriptor;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
             array('NOT'),
507 507
             array('&&', 'AND'),
508 508
             array('XOR'),
509
-            array('||', 'OR'), );
509
+            array('||', 'OR'),);
510 510
 
511 511
     private static $OPERATOR_TO_CLASS = array(
512 512
             '=' => 'SQLParser\Node\Equal',
@@ -813,7 +813,7 @@  discard block
 block discarded – undo
813 813
      */
814 814
     public static function nodeToInstanceDescriptor($node, MoufManager $moufManager)
815 815
     {
816
-        return self::array_map_deep($node, function ($item) use ($moufManager) {
816
+        return self::array_map_deep($node, function($item) use ($moufManager) {
817 817
             if ($item instanceof NodeInterface) {
818 818
                 return $item->toInstanceDescriptor($moufManager);
819 819
             } else {
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
     {
858 858
         if (is_array($nodes)) {
859 859
             $elems = array();
860
-            array_walk_recursive($nodes, function ($item) use (&$elems, $platform, $indent, $parameters, $conditionsMode, $extrapolateParameters) {
860
+            array_walk_recursive($nodes, function($item) use (&$elems, $platform, $indent, $parameters, $conditionsMode, $extrapolateParameters) {
861 861
                 if ($item instanceof SqlRenderInterface) {
862 862
                     $itemSql = $item->toSql($parameters, $platform, $indent, $conditionsMode, $extrapolateParameters);
863 863
                     if ($itemSql !== null) {
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -822,6 +822,9 @@
 block discarded – undo
822 822
         });
823 823
     }
824 824
 
825
+    /**
826
+     * @param \Closure $callback
827
+     */
825 828
     private static function array_map_deep($array, $callback)
826 829
     {
827 830
         $new = array();
Please login to merge, or discard this patch.
src/SQLParser/Query/Select.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,6 @@
 block discarded – undo
32 32
  */
33 33
 namespace SQLParser\Query;
34 34
 
35
-use Doctrine\DBAL\Connection;
36 35
 use Doctrine\DBAL\Platforms\AbstractPlatform;
37 36
 use Mouf\MoufInstanceDescriptor;
38 37
 use SQLParser\Node\NodeFactory;
Please login to merge, or discard this patch.
src/SQLParser/Query/Union.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace SQLParser\Query;
4 4
 
5
-use Doctrine\DBAL\Connection;
6 5
 use Doctrine\DBAL\Platforms\AbstractPlatform;
7 6
 use Mouf\MoufInstanceDescriptor;
8 7
 use SQLParser\Node\NodeFactory;
Please login to merge, or discard this patch.
src/SQLParser/Node/Parameter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@
 block discarded – undo
166 166
             if ($parameters[$this->name] === null) {
167 167
                 return 'null';
168 168
             } elseif (is_array($parameters[$this->name])) {
169
-                return implode(',', array_map(function ($item) use ($platform) {
169
+                return implode(',', array_map(function($item) use ($platform) {
170 170
                         return $platform->quoteStringLiteral($this->autoPrepend.$item.$this->autoAppend);
171 171
                     }, $parameters[$this->name]));
172 172
             } else {
Please login to merge, or discard this patch.