Skip to content

Commit 5d90738

Browse files
committed
chore(ControllerMethod): Remove unused property
Signed-off-by: provokateurin <[email protected]>
1 parent eec3922 commit 5d90738

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

generate-spec.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,6 @@
520520
}
521521

522522
$classMethodInfo = ControllerMethod::parse($routeName, $definitions, $methodFunction, $isAdmin, $isDeprecated, $isPasswordConfirmation, $isCORS);
523-
if ($classMethodInfo->returns !== []) {
524-
Logger::error($routeName, 'Returns an invalid response');
525-
continue;
526-
}
527523
if (count($classMethodInfo->responses) == 0) {
528524
Logger::error($routeName, 'Returns no responses');
529525
continue;

src/ControllerMethod.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class ControllerMethod {
3030
public function __construct(
3131
public array $parameters,
3232
public array $responses,
33-
public array $returns,
3433
public array $responseDescription,
3534
public array $description,
3635
public ?string $summary,
@@ -51,7 +50,6 @@ public static function parse(string $context,
5150
$parameters = [];
5251
$responses = [];
5352
$responseDescriptions = [];
54-
$returns = [];
5553

5654
$methodDescription = [];
5755
$methodSummary = null;
@@ -266,7 +264,7 @@ public static function parse(string $context,
266264
Logger::warning($context, 'Summary ends with a punctuation mark');
267265
}
268266

269-
return new ControllerMethod($parameters, $responses, $returns, $responseDescriptions, $methodDescription, $methodSummary, $isDeprecated);
267+
return new ControllerMethod($parameters, $responses, $responseDescriptions, $methodDescription, $methodSummary, $isDeprecated);
270268
}
271269

272270
}

0 commit comments

Comments
 (0)