mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-20 23:41:57 +02:00
cs fixes
This commit is contained in:
parent
2b86f6497a
commit
71497ab319
@ -17,8 +17,8 @@
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6.2",
|
||||
"tracy/tracy": "^2.4",
|
||||
"symplify/easy-coding-standard": "@dev",
|
||||
"phpstan/phpstan": "^0.7"
|
||||
"symplify/easy-coding-standard": "^2.2",
|
||||
"phpstan/phpstan": "^0.8"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@ -32,8 +32,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"all": ["phpunit", "@cs", "@ps"],
|
||||
"cs": "ecs check src tests",
|
||||
"fs": "ecs check src tests --fix",
|
||||
"ps": "phpstan analyse src tests --level 7 --configuration phpstan.neon"
|
||||
"check-cs": "ecs check bin src tests",
|
||||
"fix-cs": "ecs check bin src tests --fix",
|
||||
"phpstan": "phpstan analyse bin src tests --level 7 --configuration phpstan.neon"
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,2 @@
|
||||
includes:
|
||||
# todo:
|
||||
# - vendor/symplify/easy-coding-standard/config/
|
||||
- vendor/symplify/easy-coding-standard/config/psr2-checkers.neon
|
@ -65,4 +65,4 @@ final class ReconstructCommand extends Command
|
||||
|
||||
return iterator_to_array($finder->getIterator());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ final class InjectAnnotationToConstructorNodeVisitor extends NodeVisitorAbstract
|
||||
if (! $classElementStatement instanceof Property) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$propertyNode = $classElementStatement;
|
||||
|
||||
$propertyDocBlock = $this->createDocBlockFromProperty($propertyNode);
|
||||
|
@ -160,7 +160,8 @@ final class GetterToPropertyNodeVisitor extends NodeVisitorAbstract
|
||||
$serviceName = $argument->value;
|
||||
|
||||
$serviceType = $this->serviceFromKernelResolver->resolveServiceClassByNameFromKernel(
|
||||
$serviceName, LocalKernel::class
|
||||
$serviceName,
|
||||
LocalKernel::class
|
||||
);
|
||||
|
||||
if ($serviceType === null) {
|
||||
@ -173,7 +174,6 @@ final class GetterToPropertyNodeVisitor extends NodeVisitorAbstract
|
||||
$this->classPropertyCollector->addPropertyForClass($this->className, $serviceType, $propertyName);
|
||||
|
||||
return $this->createPropertyFetch($propertyName);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -184,7 +184,8 @@ final class GetterToPropertyNodeVisitor extends NodeVisitorAbstract
|
||||
return new PropertyFetch(
|
||||
new Variable('this', [
|
||||
'name' => $propertyName
|
||||
]), $propertyName
|
||||
]),
|
||||
$propertyName
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -14,4 +14,3 @@ final class Test extends AbstractReconstructorTestCase
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user