for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* `SET` statement.
*
* @package SqlParser
* @subpackage Statements
*/
namespace SqlParser\Statements;
use SqlParser\Statement;
use SqlParser\Components\SetOperation;
use SqlParser\Components\OptionsArray;
* @category Statements
* @author Dan Ungureanu <[email protected]>
* @license http://opensource.org/licenses/GPL-2.0 GNU Public License
class SetStatement extends Statement
{
* The clauses of this statement, in order.
* @see Statement::$CLAUSES
* @var array
public static $CLAUSES = array(
'SET' => array('SET', 3),
);
* Possible exceptions in SET statment
public static $OPTIONS = array(
'CHARSET' => array(3, 'var'),
'CHARACTER SET' => array(3, 'var'),
'NAMES' => array(3, 'var'),
'PASSWORD' => array(3, 'expr'),
* Options used in current statement
* @var OptionsArray[]
public $options;
* The updated values.
* @var SetOperation[]
public $set;
* @return string
public function build()
return 'SET ' . OptionsArray::build($this->options)
$this->options
array<integer,object<Sql...mponents\OptionsArray>>
object<SqlParser\Components\OptionsArray>
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
. ' ' . SetOperation::build($this->set);
}
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: