From e02ba8ffa160ec5e21ca1c2e04f93be912581411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sun, 3 May 2020 13:59:02 +0200 Subject: [PATCH] Add contract for createPlatform()'s return type --- composer.lock | 8 ++++---- .../DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index 2984acb8284..2fef2750a60 100644 --- a/composer.lock +++ b/composer.lock @@ -2980,12 +2980,12 @@ "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "117a4d4d4001938bb2f11df51f2ada1b99933cc6" + "reference": "d99fbc0d4d64c6efcdd075560567eb9a5679391b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/117a4d4d4001938bb2f11df51f2ada1b99933cc6", - "reference": "117a4d4d4001938bb2f11df51f2ada1b99933cc6", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/d99fbc0d4d64c6efcdd075560567eb9a5679391b", + "reference": "d99fbc0d4d64c6efcdd075560567eb9a5679391b", "shasum": "" }, "require": { @@ -3070,7 +3070,7 @@ "inspection", "php" ], - "time": "2020-05-01T03:35:13+00:00" + "time": "2020-05-03T04:26:50+00:00" }, { "name": "webmozart/assert", diff --git a/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php b/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php index ce0d84ebf02..5a0a7e71c97 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php @@ -2,6 +2,7 @@ namespace Doctrine\Tests\DBAL\Platforms; +use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\PostgreSqlPlatform; use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\ColumnDiff; @@ -20,6 +21,11 @@ abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCa /** @var PostgreSqlPlatform */ protected $platform; + /** + * @return PostgreSqlPlatform + */ + abstract public function createPlatform() : AbstractPlatform; + public function getGenerateTableSql() : string { return 'CREATE TABLE test (id SERIAL NOT NULL, test VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id))';