From 401eae5db33f0aa7572c64692143d91b8d164889 Mon Sep 17 00:00:00 2001 From: Chuck Burgess Date: Wed, 17 Jan 2018 16:12:57 -0600 Subject: [PATCH 1/3] some strict typing changes were missed --- src/Types/AbstractList.php | 8 ++++---- src/Types/Collection.php | 4 ++-- tests/unit/CollectionResolverTest.php | 2 +- tests/unit/Types/CompoundTest.php | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Types/AbstractList.php b/src/Types/AbstractList.php index 3b185cd..99ee44d 100644 --- a/src/Types/AbstractList.php +++ b/src/Types/AbstractList.php @@ -1,4 +1,4 @@ -keyType === null) { return $this->defaultKeyType; @@ -61,7 +61,7 @@ public function getKeyType() * * @return Type */ - public function getValueType() + public function getValueType(): Type { return $this->valueType; } @@ -71,7 +71,7 @@ public function getValueType() * * @return string */ - public function __toString() + public function __toString(): string { if ($this->keyType) { return 'array<' . $this->keyType . ',' . $this->valueType . '>'; diff --git a/src/Types/Collection.php b/src/Types/Collection.php index c2e821c..d2db818 100644 --- a/src/Types/Collection.php +++ b/src/Types/Collection.php @@ -1,4 +1,4 @@ -keyType === null) { return $this->fqsen . '<' . $this->valueType . '>'; diff --git a/tests/unit/CollectionResolverTest.php b/tests/unit/CollectionResolverTest.php index d4c4a75..0a092a3 100644 --- a/tests/unit/CollectionResolverTest.php +++ b/tests/unit/CollectionResolverTest.php @@ -1,4 +1,4 @@ - Date: Wed, 17 Jan 2018 16:32:15 -0600 Subject: [PATCH 2/3] ecs --fix --- src/Types/AbstractList.php | 6 ------ src/Types/Collection.php | 2 -- 2 files changed, 8 deletions(-) diff --git a/src/Types/AbstractList.php b/src/Types/AbstractList.php index 99ee44d..17aa762 100644 --- a/src/Types/AbstractList.php +++ b/src/Types/AbstractList.php @@ -44,8 +44,6 @@ public function __construct(Type $valueType = null, Type $keyType = null) /** * Returns the type for the keys of this array. - * - * @return Type */ public function getKeyType(): Type { @@ -58,8 +56,6 @@ public function getKeyType(): Type /** * Returns the value for the keys of this array. - * - * @return Type */ public function getValueType(): Type { @@ -68,8 +64,6 @@ public function getValueType(): Type /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ public function __toString(): string { diff --git a/src/Types/Collection.php b/src/Types/Collection.php index d2db818..c7cc024 100644 --- a/src/Types/Collection.php +++ b/src/Types/Collection.php @@ -55,8 +55,6 @@ public function getFqsen() /** * Returns a rendered output of the Type as it would be used in a DocBlock. - * - * @return string */ public function __toString(): string { From fdf3df6a7643cc9f90f91ab209aa91d8faf75df7 Mon Sep 17 00:00:00 2001 From: Chuck Burgess Date: Fri, 26 Jan 2018 13:40:07 -0600 Subject: [PATCH 3/3] bump reflection-common to v2 --- composer.json | 8 ++------ composer.lock | 18 +++++++++--------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index 9bbb8d6..47bdb26 100644 --- a/composer.json +++ b/composer.json @@ -8,9 +8,10 @@ "email": "me@mikevanriel.com" } ], + "minimum-stability": "alpha", "require": { "php": ">=7.1", - "phpdocumentor/reflection-common": "^1.0" + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { "mockery/mockery": "^1.0", @@ -25,10 +26,5 @@ "psr-4": { "phpDocumentor\\Reflection\\": "tests" } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } } } diff --git a/composer.lock b/composer.lock index 25a60f7..2174a91 100644 --- a/composer.lock +++ b/composer.lock @@ -4,27 +4,27 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "3006d0b1daceebbc703572192ff6a311", + "content-hash": "31d566d6407159a80a5237ec7880736c", "packages": [ { "name": "phpdocumentor/reflection-common", - "version": "1.0.1", + "version": "2.0.0-alpha1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + "reference": "e8e68dc40f300e50f5a3b254bd7b41eecdc4ddca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/e8e68dc40f300e50f5a3b254bd7b41eecdc4ddca", + "reference": "e8e68dc40f300e50f5a3b254bd7b41eecdc4ddca", "shasum": "" }, "require": { - "php": ">=5.5" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^4.6" + "phpunit/phpunit": "^6.5" }, "type": "library", "extra": { @@ -58,7 +58,7 @@ "reflection", "static analysis" ], - "time": "2017-09-11T18:02:19+00:00" + "time": "2018-01-18T22:08:35+00:00" } ], "packages-dev": [ @@ -1481,7 +1481,7 @@ } ], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "alpha", "stability-flags": [], "prefer-stable": false, "prefer-lowest": false,