Unverified Commit 546cd674 authored by Marco Pivetta's avatar Marco Pivetta Committed by GitHub

Merge pull request #3489 from amaabdou/feature/upgrade_doctrine_cs_6_0

Update doctrine coding standard from 5.0 to 6.0
parents 5b5c2c93 bf068443
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "dc19a584f29861609d085123b65f3961",
"content-hash": "ddba260b7dfb84d2591b0a71a885166a",
"packages": [
{
"name": "doctrine/cache",
......@@ -202,29 +202,27 @@
},
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
"version": "v0.4.4",
"version": "v0.5.0",
"source": {
"type": "git",
"url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
"reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08"
"reference": "e749410375ff6fb7a040a68878c656c2e610b132"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/2e41850d5f7797cbb1af7b030d245b3b24e63a08",
"reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08",
"url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/e749410375ff6fb7a040a68878c656c2e610b132",
"reference": "e749410375ff6fb7a040a68878c656c2e610b132",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0",
"php": "^5.3|^7",
"squizlabs/php_codesniffer": "*"
"squizlabs/php_codesniffer": "^2|^3"
},
"require-dev": {
"composer/composer": "*",
"wimg/php-compatibility": "^8.0"
},
"suggest": {
"dealerdirect/qa-tools": "All the PHP QA tools you'll need"
"phpcompatibility/php-compatibility": "^9.0",
"sensiolabs/security-checker": "^4.1.0"
},
"type": "composer-plugin",
"extra": {
......@@ -242,13 +240,13 @@
"authors": [
{
"name": "Franck Nijhof",
"email": "f.nijhof@dealerdirect.nl",
"homepage": "http://workingatdealerdirect.eu",
"role": "Developer"
"email": "franck.nijhof@dealerdirect.com",
"homepage": "http://www.frenck.nl",
"role": "Developer / IT Manager"
}
],
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
"homepage": "http://workingatdealerdirect.eu",
"homepage": "http://www.dealerdirect.com",
"keywords": [
"PHPCodeSniffer",
"PHP_CodeSniffer",
......@@ -266,32 +264,32 @@
"stylecheck",
"tests"
],
"time": "2017-12-06T16:27:17+00:00"
"time": "2018-10-26T13:21:45+00:00"
},
{
"name": "doctrine/coding-standard",
"version": "5.0.0",
"version": "6.0.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/coding-standard.git",
"reference": "bb8de042a25c4fb59a2c55c350dc55cc00227a8c"
"reference": "d33f69eb98b25aa51ffe3a909f0ec77000af4701"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/coding-standard/zipball/bb8de042a25c4fb59a2c55c350dc55cc00227a8c",
"reference": "bb8de042a25c4fb59a2c55c350dc55cc00227a8c",
"url": "https://api.github.com/repos/doctrine/coding-standard/zipball/d33f69eb98b25aa51ffe3a909f0ec77000af4701",
"reference": "d33f69eb98b25aa51ffe3a909f0ec77000af4701",
"shasum": ""
},
"require": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4",
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
"php": "^7.1",
"slevomat/coding-standard": "^4.8.0",
"squizlabs/php_codesniffer": "^3.3.2"
"slevomat/coding-standard": "^5.0",
"squizlabs/php_codesniffer": "^3.4.0"
},
"type": "phpcodesniffer-standard",
"extra": {
"branch-alias": {
"dev-master": "5.0.x-dev"
"dev-master": "6.0.x-dev"
}
},
"autoload": {
......@@ -327,7 +325,7 @@
"standard",
"style"
],
"time": "2018-09-24T19:08:56+00:00"
"time": "2019-03-15T12:45:47+00:00"
},
{
"name": "doctrine/instantiator",
......@@ -2486,29 +2484,30 @@
},
{
"name": "slevomat/coding-standard",
"version": "4.8.3",
"version": "5.0.2",
"source": {
"type": "git",
"url": "https://github.com/slevomat/coding-standard.git",
"reference": "32e1ca205fc34920f323582ed29c0602e3897ae3"
"reference": "223f02b6193fe47b7b483bfa5bf75693535482dd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/slevomat/coding-standard/zipball/32e1ca205fc34920f323582ed29c0602e3897ae3",
"reference": "32e1ca205fc34920f323582ed29c0602e3897ae3",
"url": "https://api.github.com/repos/slevomat/coding-standard/zipball/223f02b6193fe47b7b483bfa5bf75693535482dd",
"reference": "223f02b6193fe47b7b483bfa5bf75693535482dd",
"shasum": ""
},
"require": {
"php": "^7.1",
"squizlabs/php_codesniffer": "^3.3.0"
"phpstan/phpdoc-parser": "^0.3.1",
"squizlabs/php_codesniffer": "^3.4.0"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "1.0.0",
"phing/phing": "2.16.1",
"phpstan/phpstan": "0.9.2",
"phpstan/phpstan-phpunit": "0.9.4",
"phpstan/phpstan-strict-rules": "0.9",
"phpunit/phpunit": "7.3.5"
"phpstan/phpstan": "0.11.1",
"phpstan/phpstan-phpunit": "0.11",
"phpstan/phpstan-strict-rules": "0.11",
"phpunit/phpunit": "8.0.0"
},
"type": "phpcodesniffer-standard",
"autoload": {
......@@ -2521,20 +2520,20 @@
"MIT"
],
"description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.",
"time": "2018-09-25T21:21:11+00:00"
"time": "2019-03-12T20:26:36+00:00"
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.3.2",
"version": "3.4.0",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e"
"reference": "379deb987e26c7cd103a7b387aea178baec96e48"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6ad28354c04b364c3c71a34e4a18b629cc3b231e",
"reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48",
"reference": "379deb987e26c7cd103a7b387aea178baec96e48",
"shasum": ""
},
"require": {
......@@ -2572,7 +2571,7 @@
"phpcs",
"standards"
],
"time": "2018-09-23T23:08:17+00:00"
"time": "2018-12-19T23:57:18+00:00"
},
{
"name": "symfony/console",
......
......@@ -107,6 +107,7 @@ class Configuration
if ($assetName instanceof AbstractAsset) {
$assetName = $assetName->getName();
}
return preg_match($filterExpression, $assetName);
};
}
......@@ -117,6 +118,7 @@ class Configuration
public function setSchemaAssetsFilter(?callable $callable = null) : ?callable
{
$this->_attributes['filterSchemaAssetsExpression'] = null;
return $this->_attributes['filterSchemaAssetsExpressionCallable'] = $callable;
}
......
......@@ -1161,6 +1161,7 @@ class Connection implements DriverConnection
try {
$res = $func($this);
$this->commit();
return $res;
} catch (Exception $e) {
$this->rollBack();
......
......@@ -225,9 +225,9 @@ class MysqliStatement implements IteratorAggregate, Statement
$streams[$parameter] = $value;
$values[$parameter] = null;
continue;
} else {
$types[$parameter - 1] = static::$_paramTypeMap[ParameterType::STRING];
}
$types[$parameter - 1] = static::$_paramTypeMap[ParameterType::STRING];
}
$values[$parameter] = $value;
......
......@@ -254,6 +254,7 @@ class OCI8Statement implements IteratorAggregate, Statement
{
if (preg_match($regex, $statement, $matches, PREG_OFFSET_CAPTURE, $offset)) {
$offset = $matches[0][1];
return $matches[0][0];
}
......
......@@ -100,7 +100,9 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection
{
if (is_int($value)) {
return $value;
} elseif (is_float($value)) {
}
if (is_float($value)) {
return sprintf('%F', $value);
}
......
......@@ -174,7 +174,9 @@ final class DriverManager
// check for existing pdo object
if (isset($params['pdo']) && ! $params['pdo'] instanceof PDO) {
throw DBALException::invalidPdoInstance();
} elseif (isset($params['pdo'])) {
}
if (isset($params['pdo'])) {
$params['pdo']->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$params['driver'] = 'pdo_' . $params['pdo']->getAttribute(PDO::ATTR_DRIVER_NAME);
} else {
......
......@@ -2968,7 +2968,6 @@ abstract class AbstractPlatform
return $this->getDateTimeTypeDeclarationSQL($fieldDeclaration);
}
/**
* Obtains DBMS specific SQL to be used to create date fields in statements
* like CREATE TABLE.
......
......@@ -501,6 +501,7 @@ class DB2Platform extends AbstractPlatform
foreach ($indexes as $definition) {
$sqls[] = $this->getCreateIndexSQL($definition, $tableName);
}
return $sqls;
}
......
......@@ -201,9 +201,13 @@ class OraclePlatform extends AbstractPlatform
{
if ($sequence->getCache() === 0) {
return ' NOCACHE';
} elseif ($sequence->getCache() === 1) {
}
if ($sequence->getCache() === 1) {
return ' NOCACHE';
} elseif ($sequence->getCache() > 1) {
}
if ($sequence->getCache() > 1) {
return ' CACHE ' . $sequence->getCache();
}
......
......@@ -821,7 +821,7 @@ SQL
}
if (is_bool($value) || is_numeric($value)) {
return $callback($value ? true : false);
return $callback((bool) $value);
}
if (! is_string($value)) {
......
......@@ -627,12 +627,15 @@ class SQLAnywherePlatform extends AbstractPlatform
switch ((int) $type) {
case self::FOREIGN_KEY_MATCH_SIMPLE:
return 'SIMPLE';
break;
case self::FOREIGN_KEY_MATCH_FULL:
return 'FULL';
break;
case self::FOREIGN_KEY_MATCH_SIMPLE_UNIQUE:
return 'UNIQUE SIMPLE';
break;
case self::FOREIGN_KEY_MATCH_FULL_UNIQUE:
return 'UNIQUE FULL';
......
......@@ -1349,6 +1349,7 @@ SQL
$query = substr($query, 0, $orderByPos) . substr($query, $currentPosition - 1);
$offset = $orderByPos;
}
return $query;
}
......
......@@ -1070,12 +1070,14 @@ class SqlitePlatform extends AbstractPlatform
if (! isset($columnNames[$normalizedColumnName])) {
unset($indexes[$key]);
continue 2;
} else {
$indexColumns[] = $columnNames[$normalizedColumnName];
if ($columnName !== $columnNames[$normalizedColumnName]) {
$changed = true;
}
$indexColumns[] = $columnNames[$normalizedColumnName];
if ($columnName === $columnNames[$normalizedColumnName]) {
continue;
}
$changed = true;
}
if (! $changed) {
......@@ -1122,12 +1124,14 @@ class SqlitePlatform extends AbstractPlatform
if (! isset($columnNames[$normalizedColumnName])) {
unset($foreignKeys[$key]);
continue 2;
} else {
$localColumns[] = $columnNames[$normalizedColumnName];
if ($columnName !== $columnNames[$normalizedColumnName]) {
$changed = true;
}
$localColumns[] = $columnNames[$normalizedColumnName];
if ($columnName === $columnNames[$normalizedColumnName]) {
continue;
}
$changed = true;
}
if (! $changed) {
......
......@@ -866,7 +866,6 @@ class QueryBuilder
return $this->add('groupBy', $groupBy, false);
}
/**
* Adds a grouping expression to the query.
*
......@@ -1188,6 +1187,7 @@ class QueryBuilder
private function getSQLForUpdate()
{
$table = $this->sqlParts['from']['table'] . ($this->sqlParts['from']['alias'] ? ' ' . $this->sqlParts['from']['alias'] : '');
return 'UPDATE ' . $table
. ' SET ' . implode(', ', $this->sqlParts['set'])
. ($this->sqlParts['where'] !== null ? ' WHERE ' . ((string) $this->sqlParts['where']) : '');
......@@ -1201,6 +1201,7 @@ class QueryBuilder
private function getSQLForDelete()
{
$table = $this->sqlParts['from']['table'] . ($this->sqlParts['from']['alias'] ? ' ' . $this->sqlParts['from']['alias'] : '');
return 'DELETE FROM ' . $table . ($this->sqlParts['where'] !== null ? ' WHERE ' . ((string) $this->sqlParts['where']) : '');
}
......
......@@ -854,7 +854,7 @@ abstract class AbstractSchemaManager
$result[$keyName] = [
'name' => $indexName,
'columns' => [],
'unique' => $tableIndex['non_unique'] ? false : true,
'unique' => ! $tableIndex['non_unique'],
'primary' => $tableIndex['primary'],
'flags' => $tableIndex['flags'] ?? [],
'options' => $options,
......
......@@ -178,7 +178,9 @@ class DB2SchemaManager extends AbstractSchemaManager
{
if ($def === 'C') {
return 'CASCADE';
} elseif ($def === 'N') {
}
if ($def === 'N') {
return 'SET NULL';
}
......
......@@ -243,7 +243,9 @@ class Index extends AbstractAsset implements Constraint
{
if ($other->isPrimary()) {
return false;
} elseif ($this->isSimpleIndex() && $other->isUnique()) {
}
if ($this->isSimpleIndex() && $other->isUnique()) {
return false;
}
......
......@@ -230,6 +230,7 @@ class MySqlSchemaManager extends AbstractSchemaManager
case 'curtime()':
return $platform->getCurrentTimeSQL();
}
return $columnDefault;
}
......
......@@ -205,7 +205,7 @@ class SqliteSchemaManager extends AbstractSchemaManager
$idx = [];
$idx['key_name'] = $keyName;
$idx['primary'] = false;
$idx['non_unique'] = $tableIndex['unique']?false:true;
$idx['non_unique'] = ! $tableIndex['unique'];
$stmt = $this->_conn->executeQuery(sprintf(
'PRAGMA INDEX_INFO (%s)',
......
......@@ -31,7 +31,6 @@ class SingleDatabaseSynchronizer extends AbstractSchemaSynchronizer
return $createSchema->toSql($this->platform);
}
/**
* {@inheritdoc}
*/
......
......@@ -610,6 +610,7 @@ class Table extends AbstractAsset
foreach ($this->getForeignKeys() as $foreignKey) {
$foreignKeyColumns = array_merge($foreignKeyColumns, $foreignKey->getColumns());
}
return $this->filterColumns($foreignKeyColumns);
}
......
......@@ -65,6 +65,7 @@ class RemoveNamespacedAssets extends AbstractVisitor
// point to nowhere.
if (! $this->schema->hasTable($fkConstraint->getForeignTableName())) {
$localTable->removeForeignKey($fkConstraint->getName());
return;
}
......
......@@ -217,7 +217,9 @@ class Statement implements IteratorAggregate, DriverStatement
{
if ($arg2 === null) {
return $this->stmt->setFetchMode($fetchMode);
} elseif ($arg3 === null) {
}
if ($arg3 === null) {
return $this->stmt->setFetchMode($fetchMode, $arg2);
}
......
......@@ -73,7 +73,9 @@ EOT
throw new InvalidArgumentException(
sprintf("SQL file '<info>%s</info>' does not exist.", $filePath)
);
} elseif (! is_readable($filePath)) {
}
if (! is_readable($filePath)) {
throw new InvalidArgumentException(
sprintf("SQL file '<info>%s</info>' does not have read permissions.", $filePath)
);
......
......@@ -73,6 +73,7 @@ final class Dumper
try {
$output = ob_get_clean();
assert(is_string($output));
return strip_tags(html_entity_decode($output));
} finally {
ini_set('html_errors', $html);
......
......@@ -19,6 +19,8 @@
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/>
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming"/>
<exclude name="SlevomatCodingStandard.ControlStructures.ControlStructureSpacing.IncorrectLinesCountAfterLastControlStructure"/>
<exclude name="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants.DisallowedLateStaticBindingForConstant"/>
</rule>
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
......@@ -60,7 +62,7 @@
</rule>
<!-- see https://github.com/doctrine/dbal/issues/3377 -->
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators.DisallowedNotEqualOperator">
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedNotEqualOperator">
<exclude-pattern>lib/Doctrine/DBAL/Schema/Comparator.php</exclude-pattern>
</rule>
</ruleset>
......@@ -36,7 +36,7 @@ use function strtotime;
class DataAccessTest extends DbalFunctionalTestCase
{
/** @var bool */
static private $generated = false;
private static $generated = false;
protected function setUp() : void
{
......
......@@ -223,6 +223,7 @@ class ResultCacheTest extends DbalFunctionalTestCase
$data[] = is_array($row) ? array_change_key_case($row, CASE_LOWER) : $row;
}
$stmt->closeCursor();
return $data;
}
......@@ -234,6 +235,7 @@ class ResultCacheTest extends DbalFunctionalTestCase
$data[] = is_array($row) ? array_change_key_case($row, CASE_LOWER) : $row;
}
$stmt->closeCursor();
return $data;
}
}
......@@ -390,6 +390,7 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
{
if (! $this->schemaManager->getDatabasePlatform() instanceof PostgreSQL94Platform) {
$this->markTestSkipped('Requires PostgresSQL 9.4+');
return;
}
......
......@@ -56,6 +56,7 @@ abstract class SchemaManagerFunctionalTestCase extends DbalFunctionalTestCase
$class = static::class;
$e = explode('\\', $class);
$testClass = end($e);
return strtolower(str_replace('SchemaManagerTest', null, $testClass));
}
......@@ -72,7 +73,6 @@ abstract class SchemaManagerFunctionalTestCase extends DbalFunctionalTestCase
$this->schemaManager = $this->connection->getSchemaManager();
}
protected function tearDown() : void
{
parent::tearDown();
......@@ -88,7 +88,6 @@ abstract class SchemaManagerFunctionalTestCase extends DbalFunctionalTestCase
}
}
/**
* @group DBAL-1220
*/
......@@ -632,7 +631,6 @@ abstract class SchemaManagerFunctionalTestCase extends DbalFunctionalTestCase
self::assertEquals(['id'], array_map('strtolower', $foreignKey->getForeignColumns()));
}
public function testTableInNamespace()
{
if (! $this->schemaManager->getDatabasePlatform()->supportsSchemas()) {
......@@ -982,6 +980,7 @@ abstract class SchemaManagerFunctionalTestCase extends DbalFunctionalTestCase
$table->setPrimaryKey(['id']);
$table->addColumn('test', 'string', ['length' => 255]);
$table->addColumn('foreign_key_test', 'integer');
return $table;
}
......@@ -993,6 +992,7 @@ abstract class SchemaManagerFunctionalTestCase extends DbalFunctionalTestCase
$table->addColumn('other_id', 'integer', ['notnull' => true]);
$table->setPrimaryKey(['id', 'other_id']);
$table->addColumn('test', 'string', ['length' => 255]);
return $table;
}
......
......@@ -13,7 +13,7 @@ use function str_repeat;
class TypeConversionTest extends DbalFunctionalTestCase
{
/** @var int */
static private $typeCounter = 0;
private static $typeCounter = 0;
protected function setUp() : void
{
......
......@@ -8,8 +8,6 @@ use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DbalPerformanceTestCase;
/**
* Class TypeConversionPerformanceTest
*
* @group performance
*/
class TypeConversionPerformanceTest extends DbalPerformanceTestCase
......
......@@ -75,7 +75,6 @@ abstract class AbstractMySQLPlatformTestCase extends AbstractPlatformTestCase
);
}
public function testGeneratesDDLSnippets()
{
self::assertEquals('SHOW DATABASES', $this->platform->getListDatabasesSQL());
......
......@@ -628,8 +628,11 @@ abstract class AbstractPlatformTestCase extends DbalTestCase
}
abstract protected function getQuotedColumnInPrimaryKeySQL();
abstract protected function getQuotedColumnInIndexSQL();
abstract protected function getQuotedNameInIndexSQL();
abstract protected function getQuotedColumnInForeignKeySQL();
/**
......
......@@ -44,7 +44,6 @@ class SQLServer2012PlatformTest extends AbstractSQLServerPlatformTestCase
);
}
public function testModifyLimitQuery()
{
$sql = $this->platform->modifyLimitQuery('SELECT * FROM user', 10, 0);
......@@ -270,7 +269,6 @@ class SQLServer2012PlatformTest extends AbstractSQLServerPlatformTestCase
self::assertEquals($sql, $expected);
}
/**
* @throws DBALException
*/
......
......@@ -99,6 +99,7 @@ class ColumnTest extends TestCase
];
$string = Type::getType('string');
return new Column('foo', $string, $options);
}
......
......@@ -795,7 +795,6 @@ class ComparatorTest extends TestCase
self::assertArrayHasKey('id', $tableDiff->changedColumns);
}
/**
* @group DBAL-105
*/
......@@ -823,7 +822,6 @@ class ComparatorTest extends TestCase
self::assertCount(0, $tableDiff->removedColumns);
}
/**
* @group DBAL-112
*/
......@@ -963,7 +961,6 @@ class ComparatorTest extends TestCase
self::assertCount(0, $diff->removedSequences);
}
/**
* Check that added autoincrement sequence is not populated in newSequences
*
......@@ -987,6 +984,7 @@ class ComparatorTest extends TestCase
self::assertCount(0, $diff->newSequences);
}
/**
* You can get multiple drops for a FK when a table referenced by a foreign
* key is deleted, as this FK is referenced twice, once on the orphanedForeignKeys
......
......@@ -118,6 +118,7 @@ class SchemaDiffTest extends TestCase
$fk = new ForeignKeyConstraint(['id'], 'foreign_table', ['id']);
$fk->setLocalTable(new Table('local_table'));
$diff->orphanedForeignKeys[] = $fk;
return $diff;
}
}
......@@ -25,6 +25,7 @@ class PoolingShardManagerTest extends TestCase
->will($this->returnCallback(static function ($value) {
return $value;
}));
return $mock;
}
......@@ -34,6 +35,7 @@ class PoolingShardManagerTest extends TestCase
$mock->expects($this->any())
->method('pickShard')
->willReturn(1);
return $mock;
}
......
......@@ -89,6 +89,7 @@ class SQLAzureShardManagerTest extends TestCase
->disableOriginalConstructor()
->getMock();
$conn->expects($this->at(0))->method('getParams')->will($this->returnValue($params));
return $conn;
}
}
......@@ -26,6 +26,7 @@ class ConversionExceptionTest extends TestCase
$exception->getMessage()
);
}
/**
* @param mixed $nonScalar
*
......
......@@ -74,7 +74,9 @@ abstract class DbalFunctionalTestCase extends DbalTestCase
$params = array_map(static function ($p) {
if (is_object($p)) {
return get_class($p);
} elseif (is_scalar($p)) {
}
if (is_scalar($p)) {
return "'" . $p . "'";
}
......
......@@ -10,6 +10,7 @@ class DriverConnectionMock implements Connection
public function prepare($prepareString)
{
}
public function query()
{
}
......@@ -21,21 +22,27 @@ class DriverConnectionMock implements Connection
public function exec($statement)
{
}
public function lastInsertId($name = null)
{
}
public function beginTransaction()
{
}
public function commit()
{
}
public function rollBack()
{
}
public function errorCode()
{
}
public function errorInfo()
{
}
......
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