passwordGenerator = $passwordGenerator; $this->configurationManager = $configurationManager; } public function Setup() : string { if(!$this->CanBeInstalled()) { return ''; } $password = $this->passwordGenerator->GeneratePassword(8); $this->configurationManager->SetPassword($password); return $password; } public function CanBeInstalled() : bool { return is_null($this->configurationManager->GetPassword()); } }