mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-31 20:20:15 +02:00
PHP8
This commit is contained in:
@@ -4,11 +4,8 @@ namespace DesignPatterns\Behavioral\Visitor;
|
||||
|
||||
class User implements Role
|
||||
{
|
||||
private string $name;
|
||||
|
||||
public function __construct(string $name)
|
||||
public function __construct(private string $name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getName(): string
|
||||
|
Reference in New Issue
Block a user