public function changeName($newName) { \Assert\that($newName)->notEmpty()->string(); if ($newName != $this->name) { $this->recordThat(UserWasRenamed::occur($this->uuid->toString(), ['new_name' => $newName, 'old_name' => $this->name])); } }