<?php namespace domain\User\UserGroup; use domain\_\AbstractBuilder; class UserGroupBuilder extends AbstractBuilder { public function instanciateUserGroup(): UserGroup { $userGroup = new UserGroup(); return $userGroup; } public function createUserGroup(): UserGroup { $userGroup = $this->instanciateUserGroup(); $this->create($userGroup); return $userGroup; } }