name = $software->getName(); $this->description = $software->getDescription(); } public function createOrUpdateEntity(?Software $software = null): Software { if (!$software) { $software = new Software(); } $software->setName($this->name); $software->setDescription($this->description); return $software; } }