composer require met_mw/phpstormmetagenerator
See the folder "example" at package's root.
use PhpStormMetaGenerator\Drivers\HostCMS\AdminEntitiesDriver;
use PhpStormMetaGenerator\Drivers\HostCMS\EntitiesDriver;
use PhpStormMetaGenerator\MetaGenerator;
// Replace it by project root path
const CMS_FOLDER = '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR
. 'tests' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'hostcms' . DIRECTORY_SEPARATOR;
// Meta-file path
$phpStormMetaFilePath = CMS_FOLDER . '.phpstorm.meta.php';
// Modules directory path
$entitiesPath = CMS_FOLDER . 'modules';
// Administrator's area classes directory path
$adminEntitiesPath = CMS_FOLDER . 'adminentities';
$metaGenerator = new MetaGenerator($phpStormMetaFilePath);
$metaGenerator->addDriver(new DriverEntities($entitiesPath)) // Add entities driver
->addDriver(new DriverAdminEntities($adminEntitiesPath)) // Add admin-entities driver
->scan()
->printFile();
The met-mw/PhpStormMetaGenerator package is open-sourced software licensed under the MIT license