My own logic based on the PHPStorm guide
The root folder
reasoning: Your source code can be in mutliple folder inside the root.
alternative: Just mark the real folder you have your code inside
app, bootstrap, config, routes, (more...)
Click this button to mark the selected folder as the root for namespaces used in your project. Based on this setting, PhpStorm suggests you the proper folder name when you want to create a new namespace under another parent namespace during creation or moving a PHP class, that is, when you are actually creating or moving a PHP class to a non-existing namespace under another parent namespace. If no Sources folder is specified, you will have to type the proper folder manually.
Appointing a Sources folder is not mandatory but this helps you keep your project structure in compliance with the PSR0 and PSR4 standards. See Configuring PHP Namespaces in a Project for details.
Click this button to mark the selected folder as a test root.
reasoning: All (composer) libraries we use in our project live in vendor, but are not our own code. We should not search trough it by default. In storage live caching files, files that have no significant meaning to us, we do not track them in version control (like vendor). We could just delete them and the application would still work.
Click this button to mark the selected folder as excluded so PhpStorm ignores it during indexing, parsing, and code completion.
Click this button to enable PhpStorm to complete relative paths to resources under the selected folder.