Skip to content
Permalink
Browse files

Fixed CS

  • Loading branch information...
lorenzo committed Mar 26, 2016
1 parent 17c3bef commit 480a1f0920e1435868b49760506e34fa182b4acf
@@ -26,8 +26,8 @@
class BetweenExpression implements ExpressionInterface, FieldInterface
{
use FieldTrait;
use ExpressionTypeCasterTrait;
use FieldTrait;
/**
* The first value in the expression
@@ -29,8 +29,8 @@
class Comparison implements ExpressionInterface, FieldInterface
{
use FieldTrait;
use ExpressionTypeCasterTrait;
use FieldTrait;
/**
* The value to be used in the right hand side of the operation
@@ -283,7 +283,7 @@ protected function _flattenValue($value, $generator, $type = 'string')
* and all ExpressionInterface objects that could be found in the second
* position.
*
* @param array|Traversable $values
* @param array|Traversable $values The rows to insert
* @return array
*/
protected function _collectExpressions($values)
@@ -31,8 +31,8 @@
class FunctionExpression extends QueryExpression implements TypedResultInterface
{
use TypedResultTrait;
use ExpressionTypeCasterTrait;
use TypedResultTrait;
/**
* The name of the function to be constructed when generating the SQL string
@@ -32,8 +32,8 @@
class ValuesExpression implements ExpressionInterface
{
use TypeMapTrait;
use ExpressionTypeCasterTrait;
use TypeMapTrait;
/**
* Array of values to insert.
@@ -66,7 +66,7 @@ protected function _castToExpression($value, $type)
*/
protected function _requiresToExpressionCasting($types)
{
$result = [];
$result = [];
$types = array_filter($types);
foreach ($types as $k => $type) {
$object = Type::build($type);
@@ -43,4 +43,3 @@ class OrderedUuidItemsFixture extends TestFixture
public $records = [
];
}
@@ -43,7 +43,7 @@ public function toPHP($value, Driver $d)
public function toExpression($value)
{
$substr = function ($start, $lenght = null) use ($value) {
return new FunctionExpression(
return new FunctionExpression(
'SUBSTR',
$lenght === null ? [$value, $start] : [$value, $start, $lenght],
['string', 'integer', 'integer']
@@ -194,7 +194,7 @@ public function testSelectWithFunction()
->select('id')
->from('ordered_uuid_items')
->where(function ($exp, $q) {
return $exp->eq(
return $exp->eq(
'id',
$q->func()->concat(['48298a29-81c0-4c26-a7fb', '-413140cf8569'], []),
'ordered_uuid'
@@ -13,16 +13,16 @@
*/
namespace Cake\Test\TestCase\Database;
use Cake\TestSuite\TestCase;
use Cake\Database\Type\StringType;
use Cake\Database\Type\ExpressionTypeInterface;
use Cake\Database\Expression\FunctionExpression;
use Cake\Database\ValueBinder;
use Cake\Database\Type;
use Cake\Database\Expression\Comparison;
use Cake\Database\Expression\BetweenExpression;
use Cake\Database\Expression\CaseExpression;
use Cake\Database\Expression\Comparison;
use Cake\Database\Expression\FunctionExpression;
use Cake\Database\Expression\ValuesExpression;
use Cake\Database\Type;
use Cake\Database\Type\ExpressionTypeInterface;
use Cake\Database\Type\StringType;
use Cake\Database\ValueBinder;
use Cake\TestSuite\TestCase;
class TestType extends StringType implements ExpressionTypeInterface
{
@@ -128,7 +128,7 @@ public function testCaseExpression()
$case = new CaseExpression(
[new Comparison('foo', '1', 'string', '=')],
['value1', 'value2'],
['test' , 'test']
['test', 'test']
);
$binder = new ValueBinder;

0 comments on commit 480a1f0

Please sign in to comment.
You can’t perform that action at this time.