mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-23 19:24:48 +01:00
remove unused methods
This commit is contained in:
parent
f02c5810ab
commit
30f687274b
@ -71,7 +71,6 @@ final class DocBlockAnalyzer
|
||||
// advanced check, e.g. for "Namespaced\Annotations\DI"
|
||||
$phpDocInfo = $this->createPhpDocInfoWithFqnTypesFromNode($node);
|
||||
|
||||
// is namespaced annotation?
|
||||
if ($this->isNamespaced($name)) {
|
||||
$this->fqnAnnotationTypeDecorator->decorate($phpDocInfo, $node);
|
||||
}
|
||||
@ -160,20 +159,6 @@ final class DocBlockAnalyzer
|
||||
return $phpDocInfo->getVarTypes();
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo add test for Multi|Types
|
||||
*/
|
||||
public function getTypeForParam(Node $node, string $paramName): ?string
|
||||
{
|
||||
if ($node->getDocComment() === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$phpDocInfo = $this->createPhpDocInfoWithFqnTypesFromNode($node);
|
||||
|
||||
return (string) $phpDocInfo->getParamTypeNode($paramName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @final
|
||||
* @return PhpDocTagNode[]
|
||||
|
@ -61,15 +61,6 @@ CODE_SAMPLE;
|
||||
$this->assertSame(['int'], $this->docBlockAnalyzer->getVarTypes($node));
|
||||
}
|
||||
|
||||
public function testGetParamTypeFor(): void
|
||||
{
|
||||
$node = $this->createNodeWithDoc('
|
||||
* @param ParamType $paramName
|
||||
');
|
||||
|
||||
$this->assertSame('ParamType', $this->docBlockAnalyzer->getTypeForParam($node, 'paramName'));
|
||||
}
|
||||
|
||||
private function createNodeWithDoc(string $doc): String_
|
||||
{
|
||||
$node = new String_('string');
|
||||
|
@ -39,16 +39,4 @@ final class PropertyFetchNodeFactory
|
||||
|
||||
return $this->builderFactory->propertyFetch($localVariable, $propertyName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates "$this->propertyName[]"
|
||||
*/
|
||||
public function createLocalArrayFetchWithPropertyName(string $propertyName): PropertyFetch
|
||||
{
|
||||
$localVariable = new Variable('this', [
|
||||
'name' => $propertyName,
|
||||
]);
|
||||
|
||||
return $this->builderFactory->propertyFetch($localVariable, $propertyName . '[]');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user