Skip to content

Commit

Permalink
Fixed CS
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 26, 2016
1 parent 17c3bef commit 480a1f0
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/Database/Expression/BetweenExpression.php
Expand Up @@ -26,8 +26,8 @@
class BetweenExpression implements ExpressionInterface, FieldInterface
{

use FieldTrait;
use ExpressionTypeCasterTrait;
use FieldTrait;

/**
* The first value in the expression
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Expression/Comparison.php
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Expression/FunctionExpression.php
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Expression/ValuesExpression.php
Expand Up @@ -32,8 +32,8 @@
class ValuesExpression implements ExpressionInterface
{

use TypeMapTrait;
use ExpressionTypeCasterTrait;
use TypeMapTrait;

/**
* Array of values to insert.
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Type/ExpressionTypeCasterTrait.php
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion tests/Fixture/OrderedUuidItemsFixture.php
Expand Up @@ -43,4 +43,3 @@ class OrderedUuidItemsFixture extends TestFixture
public $records = [
];
}

Expand Up @@ -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']
Expand Down Expand Up @@ -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'
Expand Down
16 changes: 8 additions & 8 deletions tests/TestCase/Database/ExpressionTypeCastingTest.php
Expand Up @@ -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
{
Expand Down Expand Up @@ -128,7 +128,7 @@ public function testCaseExpression()
$case = new CaseExpression(
[new Comparison('foo', '1', 'string', '=')],
['value1', 'value2'],
['test' , 'test']
['test', 'test']
);

$binder = new ValueBinder;
Expand Down

0 comments on commit 480a1f0

Please sign in to comment.