IDE autocompletion for custom components

How to make work IDE autocomplete for custom components and `Yii::$app->user->identity`.