Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rename some methods of EnrichedReflector #764

Merged
merged 1 commit into from
Nov 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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