Accessing categories on the interface common\interfaces\CategoryInterface suggest that you code against a concrete implementation. How about adding an instanceof check?
Accessing id on the interface common\interfaces\UserInterface suggest that you code against a concrete implementation. How about adding an instanceof check?