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