@@ -20,7 +20,7 @@ |
||
| 20 | 20 | protected function setUp() |
| 21 | 21 | { |
| 22 | 22 | $this->_platform = new MockPlatform(); |
| 23 | - if (!Type::hasType('vardatetime')) { |
|
| 23 | + if ( ! Type::hasType('vardatetime')) { |
|
| 24 | 24 | Type::addType('vardatetime', 'Doctrine\DBAL\Types\VarDateTimeType'); |
| 25 | 25 | } |
| 26 | 26 | $this->_type = Type::getType('vardatetime'); |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | protected function setUp() |
| 24 | 24 | { |
| 25 | - if (! Type::hasType('vardatetime_immutable')) { |
|
| 25 | + if ( ! Type::hasType('vardatetime_immutable')) { |
|
| 26 | 26 | Type::addType('vardatetime_immutable', VarDateTimeImmutableType::class); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -108,11 +108,11 @@ |
||
| 108 | 108 | */ |
| 109 | 109 | private function skipWhenNotUsingPhp56AndPdoPgsql() |
| 110 | 110 | { |
| 111 | - if (! defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) { |
|
| 111 | + if ( ! defined('PDO::PGSQL_ATTR_DISABLE_PREPARES')) { |
|
| 112 | 112 | $this->markTestSkipped('Test requires PHP 5.6+'); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - if (! (isset($GLOBALS['db_type']) && $GLOBALS['db_type'] === 'pdo_pgsql')) { |
|
| 115 | + if ( ! (isset($GLOBALS['db_type']) && $GLOBALS['db_type'] === 'pdo_pgsql')) { |
|
| 116 | 116 | $this->markTestSkipped('Test enabled only when using pdo_pgsql specific phpunit.xml'); |
| 117 | 117 | } |
| 118 | 118 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | { |
| 12 | 12 | protected function setUp() |
| 13 | 13 | { |
| 14 | - if (!extension_loaded('oci8')) { |
|
| 14 | + if ( ! extension_loaded('oci8')) { |
|
| 15 | 15 | $this->markTestSkipped('oci8 is not installed.'); |
| 16 | 16 | } |
| 17 | 17 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | parent::setUp(); |
| 29 | 29 | |
| 30 | - if (! $this->_conn->getDatabasePlatform() instanceof MySqlPlatform) { |
|
| 30 | + if ( ! $this->_conn->getDatabasePlatform() instanceof MySqlPlatform) { |
|
| 31 | 31 | $this->markTestSkipped('MySQL only test.'); |
| 32 | 32 | } |
| 33 | 33 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | public function testRestoresErrorHandlerOnException() |
| 45 | 45 | { |
| 46 | - $handler = function () { self::fail('Never expected this to be called'); }; |
|
| 46 | + $handler = function() { self::fail('Never expected this to be called'); }; |
|
| 47 | 47 | $default_handler = set_error_handler($handler); |
| 48 | 48 | |
| 49 | 49 | try { |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $this->_conn->exec($sql); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - } catch(\Exception $e) { |
|
| 35 | + } catch (\Exception $e) { |
|
| 36 | 36 | } |
| 37 | 37 | $this->generator = new TableGenerator($this->_conn); |
| 38 | 38 | } |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | $sm = $this->_conn->getSchemaManager(); |
| 34 | 34 | $sm->createTable($table); |
| 35 | - } catch(\Exception $e) { |
|
| 35 | + } catch (\Exception $e) { |
|
| 36 | 36 | |
| 37 | 37 | } |
| 38 | 38 | $this->_conn->exec($this->_conn->getDatabasePlatform()->getTruncateTableSQL('blob_table')); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | try { |
| 41 | 41 | $this->_conn->getSchemaManager()->createTable($table); |
| 42 | - } catch(\Exception $e) { |
|
| 42 | + } catch (\Exception $e) { |
|
| 43 | 43 | |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -51,21 +51,21 @@ discard block |
||
| 51 | 51 | $obj->bar = "baz"; |
| 52 | 52 | |
| 53 | 53 | return array( |
| 54 | - array('string', 'ABCDEFGaaaBBB', 'string'), |
|
| 55 | - array('boolean', true, 'bool'), |
|
| 56 | - array('boolean', false, 'bool'), |
|
| 57 | - array('bigint', 12345678, 'string'), |
|
| 58 | - array('smallint', 123, 'int'), |
|
| 59 | - array('datetime', new \DateTime('2010-04-05 10:10:10'), 'DateTime'), |
|
| 54 | + array('string', 'ABCDEFGaaaBBB', 'string'), |
|
| 55 | + array('boolean', true, 'bool'), |
|
| 56 | + array('boolean', false, 'bool'), |
|
| 57 | + array('bigint', 12345678, 'string'), |
|
| 58 | + array('smallint', 123, 'int'), |
|
| 59 | + array('datetime', new \DateTime('2010-04-05 10:10:10'), 'DateTime'), |
|
| 60 | 60 | array('datetimetz', new \DateTime('2010-04-05 10:10:10'), 'DateTime'), |
| 61 | - array('date', new \DateTime('2010-04-05'), 'DateTime'), |
|
| 62 | - array('time', new \DateTime('1970-01-01 10:10:10'), 'DateTime'), |
|
| 63 | - array('text', str_repeat('foo ', 1000), 'string'), |
|
| 64 | - array('array', array('foo' => 'bar'), 'array'), |
|
| 61 | + array('date', new \DateTime('2010-04-05'), 'DateTime'), |
|
| 62 | + array('time', new \DateTime('1970-01-01 10:10:10'), 'DateTime'), |
|
| 63 | + array('text', str_repeat('foo ', 1000), 'string'), |
|
| 64 | + array('array', array('foo' => 'bar'), 'array'), |
|
| 65 | 65 | array('json_array', array('foo' => 'bar'), 'array'), |
| 66 | - array('object', $obj, 'object'), |
|
| 67 | - array('float', 1.5, 'float'), |
|
| 68 | - array('decimal', 1.55, 'string'), |
|
| 66 | + array('object', $obj, 'object'), |
|
| 67 | + array('float', 1.5, 'float'), |
|
| 68 | + array('decimal', 1.55, 'string'), |
|
| 69 | 69 | ); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $typeInstance = Type::getType($type); |
| 82 | 82 | $insertionValue = $typeInstance->convertToDatabaseValue($originalValue, $this->_conn->getDatabasePlatform()); |
| 83 | 83 | |
| 84 | - $this->_conn->insert('type_conversion', array('id' => ++self::$typeCounter, $columnName => $insertionValue)); |
|
| 84 | + $this->_conn->insert('type_conversion', array('id' =>++self::$typeCounter, $columnName => $insertionValue)); |
|
| 85 | 85 | |
| 86 | 86 | $sql = "SELECT " . $columnName . " FROM type_conversion WHERE id = " . self::$typeCounter; |
| 87 | 87 | $actualDbValue = $typeInstance->convertToPHPValue($this->_conn->fetchColumn($sql), $this->_conn->getDatabasePlatform()); |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | { |
| 150 | 150 | parent::setUp(); |
| 151 | 151 | |
| 152 | - if (! $this->_conn->getSchemaManager()->tablesExist('ddc1372_foobar')) { |
|
| 152 | + if ( ! $this->_conn->getSchemaManager()->tablesExist('ddc1372_foobar')) { |
|
| 153 | 153 | try { |
| 154 | 154 | $table = new Table('ddc1372_foobar'); |
| 155 | 155 | $table->addColumn('id', 'integer'); |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | 'foo' => 2, |
| 191 | 191 | 'bar' => 2, |
| 192 | 192 | ]); |
| 193 | - } catch(\Exception $e) { |
|
| 193 | + } catch (\Exception $e) { |
|
| 194 | 194 | $this->fail($e->getMessage()); |
| 195 | 195 | } |
| 196 | 196 | } |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | * @param array $types |
| 204 | 204 | * @param array $expected |
| 205 | 205 | */ |
| 206 | - public function testTicket($query,$params,$types,$expected) |
|
| 206 | + public function testTicket($query, $params, $types, $expected) |
|
| 207 | 207 | { |
| 208 | 208 | $stmt = $this->_conn->executeQuery($query, $params, $types); |
| 209 | 209 | $result = $stmt->fetchAll(FetchMode::ASSOCIATIVE); |