Skip to content

Commit d6f6df1

Browse files
authored
Merge pull request #102 from phpDocumentor/fix/ci
Fix ci issues
2 parents 578f552 + 97228be commit d6f6df1

File tree

6 files changed

+13
-27
lines changed

6 files changed

+13
-27
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.PHONY: install-phive
22
install-phive:
33
mkdir tools; \
4-
wget -O tools/phive.phar http://phar.io/releases/phive.phar; \
5-
wget -O tools/phive.phar.asc http://phar.io/releases/phive.phar.asc; \
4+
wget -O tools/phive.phar http://github.com/phar-io/phive/releases/download/0.13.2/phive-0.13.2.phar; \
5+
wget -O tools/phive.phar.asc http://github.com/phar-io/phive/releases/download/0.13.2/phive-0.13.2.phar.asc; \
66
gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79; \
77
gpg --verify tools/phive.phar.asc tools/phive.phar; \
88
chmod +x tools/phive.phar

composer.lock

Lines changed: 5 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phive.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="http://phar.io/phive">
33
<phar name="phpunit" version="^8.4" installed="8.4.3" location="./tools/phpunit" copy="true"/>
4-
<phar name="psalm" version="^3.7.2" installed="3.9.3" location="./tools/psalm" copy="true"/>
4+
<phar name="psalm" version="^3.7.2" installed="3.11.2" location="./tools/psalm" copy="true"/>
55
</phive>

phpstan.neon

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,3 @@ parameters:
55
# Bug in PHPStan? The error is "expects A, A given"
66
- '#Parameter \#1 \$tokens of method phpDocumentor\\Reflection\\Types\\ContextFactory::parse#'
77
# ArrayIterator::current can return null if iterated even if ArrayIterator::valid isn't checked before
8-
- '#Strict comparison using === between array\(int, string, int\)\|string and false will always evaluate to false#'
9-
- '#Strict comparison using === between string and null will always evaluate to false#'
10-
- '#Unreachable statement - code above always terminates#'

src/TypeResolver.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ public function __construct(?FqsenResolver $fqsenResolver = null)
122122
* @uses Context::getNamespace() to determine with what to prefix the type name.
123123
*
124124
* @param string $type The relative or absolute type.
125-
*
126-
* @psalm-pure
127125
*/
128126
public function resolve(string $type, ?Context $context = null) : Type
129127
{
@@ -160,8 +158,6 @@ public function resolve(string $type, ?Context $context = null) : Type
160158
* @param ArrayIterator<int, string|null> $tokens the iterator on tokens
161159
* @param int $parserContext on of self::PARSER_* constants, indicating
162160
* the context where we are in the parsing
163-
*
164-
* @psalm-pure
165161
*/
166162
private function parseTypes(ArrayIterator $tokens, Context $context, int $parserContext) : Type
167163
{
@@ -173,7 +169,9 @@ private function parseTypes(ArrayIterator $tokens, Context $context, int $parser
173169
throw new RuntimeException(
174170
'Unexpected nullable character'
175171
);
176-
} elseif ($token === '|') {
172+
}
173+
174+
if ($token === '|') {
177175
if (count($types) === 0) {
178176
throw new RuntimeException(
179177
'A type is missing before a type separator'
@@ -428,9 +426,7 @@ private function resolveTypedObject(string $type, ?Context $context = null) : Ob
428426
/**
429427
* Resolves class string
430428
*
431-
* @param ArrayIterator<int, null|string> $tokens
432-
*
433-
* @psalm-pure
429+
* @param ArrayIterator<int, (string|null)> $tokens
434430
*/
435431
private function resolveClassString(ArrayIterator $tokens, Context $context) : Type
436432
{
@@ -463,11 +459,9 @@ private function resolveClassString(ArrayIterator $tokens, Context $context) : T
463459
/**
464460
* Resolves the collection values and keys
465461
*
466-
* @param ArrayIterator<int, null|string> $tokens
462+
* @param ArrayIterator<int, (string|null)> $tokens
467463
*
468464
* @return Array_|Iterable_|Collection
469-
*
470-
* @psalm-mutation-free
471465
*/
472466
private function resolveCollection(ArrayIterator $tokens, Type $classType, Context $context) : Type
473467
{

src/Types/ContextFactory.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
* Fully Qualified names.
4848
*
4949
* @see Context for more information.
50-
*
51-
* @psalm-immutable
5250
*/
5351
final class ContextFactory
5452
{

0 commit comments

Comments
 (0)