mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-31 20:20:15 +02:00
PHP8
This commit is contained in:
@@ -12,7 +12,6 @@ use SplObserver;
|
||||
*/
|
||||
class User implements SplSubject
|
||||
{
|
||||
private string $email;
|
||||
private SplObjectStorage $observers;
|
||||
|
||||
public function __construct()
|
||||
@@ -32,7 +31,6 @@ class User implements SplSubject
|
||||
|
||||
public function changeEmail(string $email)
|
||||
{
|
||||
$this->email = $email;
|
||||
$this->notify();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user