fixed ObjectProphecy to suppress notices about object casting