N
N
Nikita Dergachov2019-08-20 11:35:45
phpstorm
Nikita Dergachov, 2019-08-20 11:35:45

How to automatically change namespace in all phpdoc in phpstorm?

How to replace full paths with FQN in all phpdoc blocks?

/**
 * @param \app\models\Test $test
 */

on the
use app\models\Test;

  /**
 * @param Test $test
 */

Is there any ready-made functionality for this or a plugin?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2019-08-20
@HeadOnFire

Replace in path? You can narrow the search by scope, directory, filter (for example, only in comments), and use regex to limit which specific FQNs to change:
PS: and yes,
FQN is the full path :)
zz: I remember before installing the latest version of PhpStorm (and cleaning plugins at the same time) there was an Intention "Replace FQN with import", but now I don't see it in my place.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question