Skip to content

Commit

Permalink
generate() fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
meuppt committed Feb 18, 2021
1 parent 866923f commit 64aa61c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function generate() {
->addComment("Controller class for callbacks and permissions.\nRoute --> " . sprintf($this->config->getPsr() . '\%s', ucfirst($this->endpoint)))
->addComment('@since ' . $this->config->getVersion());

foreach ($method as $function) {
foreach ($this->method as $function) {
$function = $class->addMethod(strtolower($function) . ucfirst($this->endpoint))
->addComment('Handles ' . $function . ' requests to the endpoint.')
->addComment('@return \WP_Rest_Response')
Expand Down

0 comments on commit 64aa61c

Please sign in to comment.