Permalink
Browse files

cleanup

  • Loading branch information...
TomasVotruba committed May 4, 2017
1 parent 5bf3731 commit c46cf39d7b48cb37fddaad1821360bdfc4203848
View
@@ -9,10 +9,3 @@ indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.bat]
end_of_line = crlf
[*.yml]
indent_style = space
indent_size = 2
View
@@ -1,23 +1,9 @@
# Define the line ending behavior of the different file extensions
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
* text eol=lf
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.php text
*.md text
# Declare files that will always have CRLF line endings on checkout.
*.bat eol=crlf
# Remove files for archives generated using `git archive`
/tests export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore
appveyor.yml export-ignore
CONTRIBUTING.md export-ignore
CHANGELOG.md
phpunit.xml.dist export-ignore
tests/ export-ignore
@@ -50,14 +50,10 @@ public function __construct(TransformerCollectorInterface $transformerCollector)
*/
public function parseDirectories(array $directories): void
{
$directoriesSourceLocator = new DirectoriesSourceLocator($directories);
$directoriesSourceLocator = $this->createDirectoriesSource($directories);
$classReflector = new ClassReflector($directoriesSourceLocator);
$classInterfaceAndTraitReflections = $this->transformBetterClassInterfaceAndTraitReflections($classReflector);
$this->separateClassInterfaceAndTraitReflections($classInterfaceAndTraitReflections);
$functionReflector = new FunctionReflector($directoriesSourceLocator);
$this->functionReflections = $this->transformBetterFunctionReflections($functionReflector);
$this->parseClassElements($directoriesSourceLocator);
$this->parseFunctions($directoriesSourceLocator);
}
/**
@@ -133,4 +129,31 @@ private function transformBetterFunctionReflections(FunctionReflector $functionR
return $this->transformerCollector->transformReflectionToElement($betterFunctionReflection);
}, $betterFunctionReflections);
}
/**
* @param $directoriesSourceLocator
*/
private function parseClassElements($directoriesSourceLocator): void
{
$classReflector = new ClassReflector($directoriesSourceLocator);
$classInterfaceAndTraitReflections = $this->transformBetterClassInterfaceAndTraitReflections($classReflector);
$this->separateClassInterfaceAndTraitReflections($classInterfaceAndTraitReflections);
}
/**
* @param $directoriesSourceLocator
*/
private function parseFunctions($directoriesSourceLocator): void
{
$functionReflector = new FunctionReflector($directoriesSourceLocator);
$this->functionReflections = $this->transformBetterFunctionReflections($functionReflector);
}
/**
* @param string[] $directories
*/
private function createDirectoriesSource(array $directories): DirectoriesSourceLocator
{
return new DirectoriesSourceLocator($directories);
}
}
@@ -32,26 +32,6 @@ public function getDirectSubClasses(): array;
*/
public function getIndirectSubClasses(): array;
/**
* @return ClassReflectionInterface[]
*/
public function getDirectImplementers(): array;
/**
* @return ClassReflectionInterface[]
*/
public function getIndirectImplementers(): array;
/**
* @return ClassReflectionInterface[]
*/
public function getDirectUsers(): array;
/**
* @return ClassReflectionInterface[]
*/
public function getIndirectUsers(): array;
public function implementsInterface(string $name): bool;
/**
@@ -70,12 +50,12 @@ public function getOwnInterfaces(): array;
public function getOwnInterfaceNames(): array;
/**
* @return MethodReflectionInterface[]|VisibilityTrait[]
* @return MethodReflectionInterface[]
*/
public function getMethods(): array;
/**
* @return MethodReflectionInterface[]|VisibilityTrait[]
* @return MethodReflectionInterface[]
*/
public function getOwnMethods(): array;
@@ -144,7 +124,7 @@ public function getTraitAliases(): array;
public function getProperties(): array;
/**
* @return PropertyReflectionInterface[]|VisibilityTrait[]
* @return PropertyReflectionInterface[]
*/
public function getOwnProperties(): array;

0 comments on commit c46cf39

Please sign in to comment.