Skip to content

Commit

Permalink
private function > final protected function
Browse files Browse the repository at this point in the history
  • Loading branch information
SignpostMarv committed Jul 3, 2018
1 parent c0b6df4 commit 012797a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/StaticMethodCollector.php
Expand Up @@ -95,7 +95,7 @@ class_exists($implementation) &&
}
}

private function CollectInterfacesFromImplementationCheckInterfaces(
final protected function CollectInterfacesFromImplementationCheckInterfaces(
string $implementation
) : Generator {
foreach ($this->interfaces as $interface) {
Expand All @@ -110,7 +110,7 @@ private function CollectInterfacesFromImplementationCheckInterfaces(
}
}

private function CollectInterfacesFromImplementation(string $implementation) : Generator
final protected function CollectInterfacesFromImplementation(string $implementation) : Generator
{
$interfaces = array_keys($this->staticMethods);
/**
Expand All @@ -127,7 +127,7 @@ private function CollectInterfacesFromImplementation(string $implementation) : G
}
}

private function CollectInterfacesFromImplementationTypes(
final protected function CollectInterfacesFromImplementationTypes(
string $implementation,
string $method,
array $types
Expand All @@ -153,7 +153,7 @@ private function CollectInterfacesFromImplementationTypes(
}
}

private function FilterIsA(string $implementation, array $interfaces) : array
final protected function FilterIsA(string $implementation, array $interfaces) : array
{
return array_filter($interfaces, function (string $interface) use ($implementation) : bool {
return is_a($implementation, $interface, true);
Expand All @@ -163,7 +163,7 @@ private function FilterIsA(string $implementation, array $interfaces) : array
/**
* @return string[]|array<string, mixed>
*/
private function FilterArrayOfInterfaces(array $interfaces, int $flag = 0) : array
final protected function FilterArrayOfInterfaces(array $interfaces, int $flag = 0) : array
{
$strings = array_filter($interfaces, 'is_string', $flag);

Expand All @@ -173,7 +173,7 @@ private function FilterArrayOfInterfaces(array $interfaces, int $flag = 0) : arr
/**
* @return string[]
*/
private function FilterArrayOfInterfacesOrClasses(array $interfaces) : array
final protected function FilterArrayOfInterfacesOrClasses(array $interfaces) : array
{
/**
* @var string[] $strings
Expand All @@ -188,7 +188,7 @@ private function FilterArrayOfInterfacesOrClasses(array $interfaces) : array
/**
* @return array<string, array>
*/
private function FilterArrayOfInterfaceOffsets(array $interfaces) : array
final protected function FilterArrayOfInterfaceOffsets(array $interfaces) : array
{
/**
* @var array<string, array> $strings
Expand All @@ -198,7 +198,7 @@ private function FilterArrayOfInterfaceOffsets(array $interfaces) : array
return array_filter($strings, 'is_array');
}

private function MakeMethodFilter(string $interface) : Closure
final protected function MakeMethodFilter(string $interface) : Closure
{
return function (string $maybe) use ($interface) : bool {
$ref = new ReflectionClass($interface);
Expand All @@ -209,7 +209,7 @@ private function MakeMethodFilter(string $interface) : Closure
};
}

private function FilterReflectionMethod(ReflectionMethod $refMethod) : bool
final protected function FilterReflectionMethod(ReflectionMethod $refMethod) : bool
{
return
$refMethod->isStatic() &&
Expand All @@ -218,7 +218,7 @@ private function FilterReflectionMethod(ReflectionMethod $refMethod) : bool
$this->FilterReflectionReturnType($refMethod->getReturnType());
}

private function FilterReflectionReturnType(? ReflectionType $refReturn) : bool
final protected function FilterReflectionReturnType(? ReflectionType $refReturn) : bool
{
$refReturnName = ($refReturn instanceof ReflectionNamedType) ? $refReturn->getName() : '';

Expand All @@ -228,7 +228,7 @@ private function FilterReflectionReturnType(? ReflectionType $refReturn) : bool
/**
* @return array<string, string[]>
*/
private function FilterMethods(string $interface, array $methods) : array
final protected function FilterMethods(string $interface, array $methods) : array
{
/**
* @var array<string, string[]>
Expand All @@ -248,7 +248,7 @@ private function FilterMethods(string $interface, array $methods) : array
/**
* @var array[]
*/
private function FilterNonZeroArray(array $in) : array
final protected function FilterNonZeroArray(array $in) : array
{
return array_filter(
$in,
Expand Down

0 comments on commit 012797a

Please sign in to comment.