summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan Ungureanu <udan1107@gmail.com>2015-08-16 21:05:08 +0300
committerDan Ungureanu <udan1107@gmail.com>2015-08-16 21:05:08 +0300
commit0405d40fa782c279c2f82ccb6449c142b7c48b4e (patch)
tree6387f0f85957e3e3ca2ec2588cb67342f91f4fae /src
parent3d3b03b25b67212ba0447b2b010bba5a4471bb44 (diff)
downloadsql-parser-0405d40fa782c279c2f82ccb6449c142b7c48b4e.zip
sql-parser-0405d40fa782c279c2f82ccb6449c142b7c48b4e.tar.gz
sql-parser-0405d40fa782c279c2f82ccb6449c142b7c48b4e.tar.bz2
Fixed Scrutinizer issue.
Diffstat (limited to 'src')
-rw-r--r--src/Components/IntoKeyword.php6
-rw-r--r--src/Components/PartitionDefinition.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Components/IntoKeyword.php b/src/Components/IntoKeyword.php
index 7a91064..5e4afcb 100644
--- a/src/Components/IntoKeyword.php
+++ b/src/Components/IntoKeyword.php
@@ -138,12 +138,12 @@ class IntoKeyword extends Component
*/
public static function build($component)
{
- if ($component->type === 'OUTFILE') {
- return 'OUTFILE "' . $component->dest . '"';
- } else {
+ if ($component->dest instanceof Expression) {
$columns = !empty($component->columns) ?
'(' . implode(', ', $component->columns) . ')' : '';
return Expression::build($component->dest) . $columns;
+ } else {
+ return 'OUTFILE "' . $component->dest . '"';
}
}
}
diff --git a/src/Components/PartitionDefinition.php b/src/Components/PartitionDefinition.php
index c46252d..df6d3f6 100644
--- a/src/Components/PartitionDefinition.php
+++ b/src/Components/PartitionDefinition.php
@@ -71,7 +71,7 @@ class PartitionDefinition extends Component
/**
* The expression used to defined this partition.
*
- * @var Expression
+ * @var Expression|string
*/
public $expr;