Skip to content

Commit

Permalink
Add default value
Browse files Browse the repository at this point in the history
  • Loading branch information
nullsec45 committed Aug 6, 2022
1 parent 069c8d4 commit 3be89a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Say.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public function __construct(private string $name)
{

}
public function sayHello(string $name):string{
public function sayHello(string $name="Guest"):string{
return "Hello $name, My name is $this->name";
}
}

0 comments on commit 3be89a8

Please sign in to comment.