improve ci

This commit is contained in:
TomasVotruba 2020-02-17 00:12:12 +01:00
parent 1498108d95
commit dfd75bea94
4 changed files with 11 additions and 4 deletions

View File

@ -32,4 +32,4 @@ jobs:
# do not intall doctrine/orm phpstan, it conflicts with Retor's one
composer install -d orm --no-dev
- run: bin/rector process orm/lib --set dead-code --autoload-file orm/vendor/autoload.php
- run: bin/rector process orm/lib --config ci/config/rector-doctrine.yaml --autoload-file orm/vendor/autoload.php --debug

View File

@ -0,0 +1,4 @@
parameters:
auto_import_names: false
sets:
- "dead-code"

View File

@ -92,8 +92,11 @@ PHP
return null;
}
/** @var PhpDocInfo $phpDocInfo */
/** @var PhpDocInfo|null $phpDocInfo */
$phpDocInfo = $node->getAttribute(AttributeKey::PHP_DOC_INFO);
if ($phpDocInfo === null) {
return null;
}
$varTagValue = $phpDocInfo->getVarTagValue();
if ($varTagValue === null) {

View File

@ -125,9 +125,9 @@ final class PropertyManipulator
return true;
}
/** @var PhpDocInfo $phpDocInfo */
/** @var PhpDocInfo|null $phpDocInfo */
$phpDocInfo = $property->getAttribute(AttributeKey::PHP_DOC_INFO);
if ($phpDocInfo->hasByType(SerializerTypeTagValueNode::class)) {
if ($phpDocInfo !== null && $phpDocInfo->hasByType(SerializerTypeTagValueNode::class)) {
return true;
}