Skip to content

Commit

Permalink
Update example.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed May 9, 2023
1 parent b81dc77 commit af49ee8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions example/example.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ public function __construct(
public function __invoke(): string
{
$number = $this->request->get('number');
$method = $this->request->get('REQUEST_METHOD');

if (!empty($number)) {
return sprintf("__invoke with %s 'number'=%d", $method, $number);
return sprintf("__invoke with 'number'=%d", $number);
}

return '__invoke with ' . $method;
return '__invoke';
}

public function customAction(int $number = 0): string
Expand Down

0 comments on commit af49ee8

Please sign in to comment.