fix using $this in a static context

Current code produces an error notice. As the method is static get_called_class should be used.