Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find all files with a function in phpstorm?

Tags:

php

phpstorm

How I can find and show all files in Phpstorm where this method

$this->other_model->any_method()

is called?

like image 936
Joss Avatar asked Dec 23 '14 21:12

Joss


People also ask

How do I search the whole project PhpStorm?

From the main menu, select Edit | Find | Find in Files Ctrl+Shift+F . In the search field, type your search string. Alternatively, in the editor, highlight the string you want to find and press Ctrl+Shift+F . PhpStorm places the highlighted string into the search field.

How do I search globally in PhpStorm?

Search everywhere From the main menu, select Navigate | Search Everywhere or press Shift twice to open the search window. By default, PhpStorm displays the list of recent files.

How do I find a file in PhpStorm?

From the Menu of PHPStorm Choose Navigate -> File or use the shortcut ALT + SHIFT + O or CMD + SHIFT + O or CTRL + SHIFT + N (as per the edit). Type the required file name you want to search. Done.

How do I search for a file name in WebStorm?

Search for files and folders Press Ctrl+Shift+N and start typing your query, CamelCase and snake_case are supported. The list shrinks as you type. Select the file or folder you need and press Enter . If you selected a file, WebStorm opens it in a new editor tab.


3 Answers

cmd+shift+f for Mac and ctrl+shift+f for Windows will find any piece of text throughout the project or directory. Or you could use alt+f7 to find usages.

PHPStorm Keyboard Mapping.

Viewing Structure of a Source File.

like image 86
kRiZ Avatar answered Oct 23 '22 21:10

kRiZ


You can search for symbol with combination Ctrl+Shift+Alt+N. This combination allows you to search not only PHP classes/methods but also PHP variables, CSS classes etc.

If you want to find method usages in files: click on your method and press Alt+F7

like image 22
zergussino Avatar answered Oct 23 '22 23:10

zergussino


If you want to search any composition of your desire search, you can use from searching everywhere. I prefer to use this because PhpStorm makes it possible to look for any item of the source code, databases, actions, elements of the user interface, etc. in a single action. to use that, only press search button in the right upper corner of phpStorm or 2 times press shift key on your keyboard. Now you can find your search everywhere. This is great functionality of phpStorm. To read more information about using this search method, go to the following link: Searching Everywhere

To See all the methods for search in phpStorm, Go to the following link:Searching Through the Source Code

like image 30
Mehdi Soltani Avatar answered Oct 23 '22 23:10

Mehdi Soltani