for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Aura\SqlQuery\Common;
class InsertBuilder extends AbstractBuilder
{
/**
*
* Builds the INTO clause.
* @return string
*/
public function buildInto($into)
return " INTO " . $this->quoter->quoteName($into);
quoter
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
}
* Builds the inserted columns and values of the statement.
public function buildValuesForInsert($col_values)
return ' ('
. $this->indentCsv(array_keys($col_values))
. PHP_EOL . ') VALUES ('
. $this->indentCsv(array_values($col_values))
. PHP_EOL . ')';
* Builds the bulk-inserted columns and values of the statement.
public function buildValuesForBulkInsert($col_order, $col_values_bulk)
$cols = " (" . implode(', ', $col_order) . ")";
$vals = array();
foreach ($col_values_bulk as $row_values) {
$vals[] = " (" . implode(', ', $row_values) . ")";
return PHP_EOL . $cols . PHP_EOL
. "VALUES" . PHP_EOL
. implode("," . PHP_EOL, $vals);
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: