Skip to content

Commit

Permalink
Adjust
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmajor committed Jun 19, 2022
1 parent 5aee7bf commit 93d837b
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 60 deletions.
5 changes: 0 additions & 5 deletions src/Reflection/Dummy/ChangedTypeMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,4 @@ public function hasSideEffects(): TrinaryLogic
return $this->reflection->hasSideEffects();
}

public function acceptsNamedArguments(): bool
{
return $this->reflection->acceptsNamedArguments();
}

}
5 changes: 0 additions & 5 deletions src/Reflection/Dummy/DummyConstructorReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ public function hasSideEffects(): TrinaryLogic
return TrinaryLogic::createNo();
}

public function acceptsNamedArguments(): bool
{
return true;
}

public function getDocComment(): ?string
{
return null;
Expand Down
5 changes: 0 additions & 5 deletions src/Reflection/Dummy/DummyMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ public function hasSideEffects(): TrinaryLogic
return TrinaryLogic::createMaybe();
}

public function acceptsNamedArguments(): bool
{
return true;
}

public function getDocComment(): ?string
{
return null;
Expand Down
2 changes: 2 additions & 0 deletions src/Reflection/ExtendedMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@
interface ExtendedMethodReflection extends MethodReflection
{

public function acceptsNamedArguments(): bool;

}
2 changes: 0 additions & 2 deletions src/Reflection/MethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,4 @@ public function getThrowType(): ?Type;

public function hasSideEffects(): TrinaryLogic;

public function acceptsNamedArguments(): bool;

}
5 changes: 0 additions & 5 deletions src/Reflection/Mixin/MixinMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,4 @@ public function hasSideEffects(): TrinaryLogic
return $this->reflection->hasSideEffects();
}

public function acceptsNamedArguments(): bool
{
return $this->reflection->acceptsNamedArguments();
}

}
5 changes: 0 additions & 5 deletions src/Reflection/Php/ClosureCallMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,4 @@ public function hasSideEffects(): TrinaryLogic
return $this->nativeMethodReflection->hasSideEffects();
}

public function acceptsNamedArguments(): bool
{
return $this->nativeMethodReflection->acceptsNamedArguments();
}

}
2 changes: 2 additions & 0 deletions src/Reflection/Php/PhpClassReflectionExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ private function createMethod(
$isInternal = $resolvedPhpDoc->isInternal();
$isFinal = $resolvedPhpDoc->isFinal();
$isPure = $resolvedPhpDoc->isPure();
$acceptsNamedArguments = $resolvedPhpDoc->acceptsNamedArguments();

return $this->methodReflectionFactory->create(
$declaringClass,
Expand All @@ -719,6 +720,7 @@ private function createMethod(
$isInternal,
$isFinal,
$isPure,
$acceptsNamedArguments,
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Reflection/Php/PhpMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function __construct(
private bool $isInternal,
private bool $isFinal,
private ?bool $isPure,
private bool $acceptsNamedArguments = true,
private bool $acceptsNamedArguments,
)
{
}
Expand Down
1 change: 1 addition & 0 deletions src/Reflection/Php/PhpMethodReflectionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function create(
bool $isInternal,
bool $isFinal,
?bool $isPure = null,
bool $acceptsNamedArguments = true,
): PhpMethodReflection;

}
5 changes: 0 additions & 5 deletions src/Reflection/Php/Soap/SoapClientMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,4 @@ public function hasSideEffects(): TrinaryLogic
return TrinaryLogic::createYes();
}

public function acceptsNamedArguments(): bool
{
return true;
}

}
5 changes: 0 additions & 5 deletions src/Reflection/ResolvedMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,4 @@ public function hasSideEffects(): TrinaryLogic
return $this->reflection->hasSideEffects();
}

public function acceptsNamedArguments(): bool
{
return $this->reflection->acceptsNamedArguments();
}

}
11 changes: 0 additions & 11 deletions src/Reflection/Type/IntersectionTypeMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,6 @@ public function hasSideEffects(): TrinaryLogic
return TrinaryLogic::maxMin(...array_map(static fn (MethodReflection $method): TrinaryLogic => $method->hasSideEffects(), $this->methods));
}

public function acceptsNamedArguments(): bool
{
foreach ($this->methods as $method) {
if (!$method->acceptsNamedArguments()) {
return false;
}
}

return true;
}

public function getDocComment(): ?string
{
return null;
Expand Down
11 changes: 0 additions & 11 deletions src/Reflection/Type/UnionTypeMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,6 @@ public function hasSideEffects(): TrinaryLogic
return TrinaryLogic::extremeIdentity(...array_map(static fn (MethodReflection $method): TrinaryLogic => $method->hasSideEffects(), $this->methods));
}

public function acceptsNamedArguments(): bool
{
foreach ($this->methods as $method) {
if (!$method->acceptsNamedArguments()) {
return false;
}
}

return true;
}

public function getDocComment(): ?string
{
return null;
Expand Down
5 changes: 5 additions & 0 deletions src/Reflection/WrappedExtendedMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,9 @@ public function hasSideEffects(): TrinaryLogic
return $this->method->hasSideEffects();
}

public function acceptsNamedArguments(): bool
{
return true;
}

}

0 comments on commit 93d837b

Please sign in to comment.