test fixes

This commit is contained in:
TomasVotruba 2017-10-26 10:26:26 +02:00
parent fd33091905
commit 73eb11b093
2 changed files with 3 additions and 2 deletions

View File

@ -56,7 +56,8 @@ final class AssignAnalyzer
private function isVariableTypeAndPropetyName(Node $node, string $expectedType, string $expectedPropertyName): bool
{
$variableTypes = $node->var->var->getAttribute(Attribute::TYPES);
if (in_array($expectedType, $variableTypes, true)) {
if (! in_array($expectedType, $variableTypes, true)) {
return false;
}

View File

@ -85,7 +85,7 @@ final class GetServiceToConstructorInjectionRector extends AbstractRector
$this->classPropertyCollector->addPropertyForClass(
(string) $methodCallNode->getAttribute(Attribute::CLASS_NAME),
$serviceType,
[$serviceType],
$propertyName
);