Skip to content

Commit

Permalink
Rename some methods of EnrichedReflector (#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Nov 13, 2022
1 parent 4daaa1d commit 5a923dc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Symbol/EnrichedReflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function isExposedFunction(string $resolvedName): bool
return !$this->belongsToExcludedNamespace($resolvedName)
&& !$this->reflector->isFunctionInternal($resolvedName)
&& (
$this->_isExposedFunctionFromGlobalNamespace($resolvedName)
$this->isExposedFunctionFromGlobalNamespaceWithoutExclusionCheck($resolvedName)
|| $this->symbolsConfiguration
->getExposedFunctions()
->matches($resolvedName)
Expand All @@ -104,15 +104,15 @@ public function isExposedFunctionFromGlobalNamespace(string $resolvedName): bool
{
return !$this->belongsToExcludedNamespace($resolvedName)
&& !$this->reflector->isFunctionInternal($resolvedName)
&& $this->_isExposedFunctionFromGlobalNamespace($resolvedName);
&& $this->isExposedFunctionFromGlobalNamespaceWithoutExclusionCheck($resolvedName);
}

public function isExposedClass(string $resolvedName): bool
{
return !$this->belongsToExcludedNamespace($resolvedName)
&& !$this->reflector->isClassInternal($resolvedName)
&& (
$this->_isExposedClassFromGlobalNamespace($resolvedName)
$this->isExposedClassFromGlobalNamespaceWithoutExclusionCheck($resolvedName)
|| $this->symbolsConfiguration
->getExposedClasses()
->matches($resolvedName)
Expand All @@ -124,7 +124,7 @@ public function isExposedClassFromGlobalNamespace(string $resolvedName): bool
{
return !$this->belongsToExcludedNamespace($resolvedName)
&& !$this->reflector->isClassInternal($resolvedName)
&& $this->_isExposedClassFromGlobalNamespace($resolvedName);
&& $this->isExposedClassFromGlobalNamespaceWithoutExclusionCheck($resolvedName);
}

public function isExposedConstant(string $name): bool
Expand Down Expand Up @@ -157,13 +157,13 @@ public function isExcludedNamespace(string $name): bool
->isRegisteredNamespace($name);
}

private function _isExposedFunctionFromGlobalNamespace(string $functionName): bool
private function isExposedFunctionFromGlobalNamespaceWithoutExclusionCheck(string $functionName): bool
{
// TODO: leverage belongsToGlobalNamespace
return $this->symbolsConfiguration->shouldExposeGlobalFunctions() && !strpos($functionName, '\\');
}

public function _isExposedClassFromGlobalNamespace(string $className): bool
public function isExposedClassFromGlobalNamespaceWithoutExclusionCheck(string $className): bool
{
// TODO: leverage belongsToGlobalNamespace
return $this->symbolsConfiguration->shouldExposeGlobalClasses() && !strpos($className, '\\');
Expand Down

0 comments on commit 5a923dc

Please sign in to comment.