Unverified Commit de568088 authored by Marco Pivetta's avatar Marco Pivetta Committed by GitHub

Merge pull request #3015 from carusogabriel/cast

[CS] A cast statement must be followed by a single space
parents ec85e548 c0a41300
......@@ -207,7 +207,7 @@ class PoolingShardConnection extends Connection
throw new ShardingException("Cannot switch shard when transaction is active.");
}
$this->activeShardId = (int)$shardId;
$this->activeShardId = (int) $shardId;
if (isset($this->activeConnections[$this->activeShardId])) {
$this->_conn = $this->activeConnections[$this->activeShardId];
......
......@@ -583,9 +583,9 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
$qb->select('u.*')->from('users', 'u')->where('u.name = ?');
self::assertEquals('SELECT u.* FROM users u WHERE u.name = ?', (string)$qb);
self::assertEquals('SELECT u.* FROM users u WHERE u.name = ?', (string) $qb);
$qb->resetQueryPart('where');
self::assertEquals('SELECT u.* FROM users u', (string)$qb);
self::assertEquals('SELECT u.* FROM users u', (string) $qb);
}
public function testResetQueryParts()
......@@ -594,9 +594,9 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
$qb->select('u.*')->from('users', 'u')->where('u.name = ?')->orderBy('u.name');
self::assertEquals('SELECT u.* FROM users u WHERE u.name = ? ORDER BY u.name ASC', (string)$qb);
self::assertEquals('SELECT u.* FROM users u WHERE u.name = ? ORDER BY u.name ASC', (string) $qb);
$qb->resetQueryParts(array('where', 'orderBy'));
self::assertEquals('SELECT u.* FROM users u', (string)$qb);
self::assertEquals('SELECT u.* FROM users u', (string) $qb);
}
public function testCreateNamedParameter()
......@@ -607,7 +607,7 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
$qb->expr()->eq('u.name', $qb->createNamedParameter(10, ParameterType::INTEGER))
);
self::assertEquals('SELECT u.* FROM users u WHERE u.name = :dcValue1', (string)$qb);
self::assertEquals('SELECT u.* FROM users u WHERE u.name = :dcValue1', (string) $qb);
self::assertEquals(10, $qb->getParameter('dcValue1'));
self::assertEquals(ParameterType::INTEGER, $qb->getParameterType('dcValue1'));
}
......@@ -620,7 +620,7 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
$qb->expr()->eq('u.name', $qb->createNamedParameter(10, ParameterType::INTEGER, ':test'))
);
self::assertEquals('SELECT u.* FROM users u WHERE u.name = :test', (string)$qb);
self::assertEquals('SELECT u.* FROM users u WHERE u.name = :test', (string) $qb);
self::assertEquals(10, $qb->getParameter('test'));
self::assertEquals(ParameterType::INTEGER, $qb->getParameterType('test'));
}
......@@ -633,7 +633,7 @@ class QueryBuilderTest extends \Doctrine\Tests\DbalTestCase
$qb->expr()->eq('u.name', $qb->createPositionalParameter(10, ParameterType::INTEGER))
);
self::assertEquals('SELECT u.* FROM users u WHERE u.name = ?', (string)$qb);
self::assertEquals('SELECT u.* FROM users u WHERE u.name = ?', (string) $qb);
self::assertEquals(10, $qb->getParameter(1));
self::assertEquals(ParameterType::INTEGER, $qb->getParameterType(1));
}
......
......@@ -85,7 +85,7 @@ class DbalFunctionalTestCase extends DbalTestCase
$message = "[".get_class($t)."] ".$t->getMessage().PHP_EOL.PHP_EOL."With queries:".PHP_EOL.$queries.PHP_EOL."Trace:".PHP_EOL.$traceMsg;
throw new \Exception($message, (int)$t->getCode(), $t);
throw new \Exception($message, (int) $t->getCode(), $t);
}
throw $t;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment