Skip to content

Commit

Permalink
Renderer: Remove redundant asserts.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Sep 12, 2022
1 parent 7f8bb00 commit 81db534
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ private function processParameters(?string $comment, \ReflectionParameter $param
$typeName::cases(),
);
} else {
assert($parameter->getName() !== '');
$return = new EndpointAggregatedParameterResponse(
position: 0,
name: $parameter->getName(),
Expand Down Expand Up @@ -145,7 +144,6 @@ private function processParameters(?string $comment, \ReflectionParameter $param
$description = (string) preg_replace('/^' . $pattern . '$/', '$2', $paramAnnotation);
}
}
assert($parameter->getName() !== '');
assert($parameter->getPosition() >= 0);

return new EndpointParameterResponse(
Expand Down Expand Up @@ -174,7 +172,6 @@ private function processEntityProperties(string $entity): array
$return = [];
foreach ($ref->getProperties() as $property) {
$property->setAccessible(true);
assert($property->getName() !== '');
[$description, $allowsNull, $scalarTypes, $entityClass] = $this->inspectPropertyInfo($property);
$defaultValue = $this->resolvePropertyDefaultValue($property, $entityInstance, $entityClass);

Expand Down Expand Up @@ -318,7 +315,6 @@ private function hydrateResponseStructure(\ReflectionClass $ref): array
$return = [];
foreach ($ref->getProperties() as $property) {
$property->setAccessible(true);
assert($property->getName() !== '');
[$description, $allowsNull, $scalarTypes, $entityClass] = $this->inspectPropertyInfo($property);
$return[] = new EntityResponsePropertyResponse(
name: $property->getName(),
Expand Down

0 comments on commit 81db534

Please sign in to comment.