Skip to content

Commit

Permalink
feat(library): selectable question option
Browse files Browse the repository at this point in the history
  • Loading branch information
kduma committed Dec 20, 2023
1 parent 074a5a2 commit 21b19c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

class Lib
{
public function helloWorld(string $name = 'World'): string
public function helloWorld(string $name = 'World', bool $question = true): string
{
return "Hello {$name}?";
return sprintf("Hello %s%s", $name, $question ? '?' : '.');
}
}

0 comments on commit 21b19c2

Please sign in to comment.