The expression return $this returns the type TournamentGenerator\Traits\WithCategories which is incompatible with the type-hinted return TournamentGenerator\Interfaces\WithCategories.
Loading history...
45
}
46
47
/**
48
* Creates a new category and adds it to the object
49
*
50
* @param string $name New category name
51
* @param null $id Id of the new category - if omitted -> it is generated automatically as unique string