met_mw/phpstormmetagenerator

PhpStorm meta-file generator (.phpstorm.meta.php).

v1.0.0 2016-06-27 12:29 UTC

This package is not auto-updated.

Last update: 2024-04-13 17:29:52 UTC


README

Build Status Coverage Status Latest Stable Version Total Downloads Latest Unstable Version License

PhpStorm meta-file generator (.phpstorm.meta.php).

Install

composer require met_mw/phpstormmetagenerator

Example

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();

License

The met-mw/PhpStormMetaGenerator package is open-sourced software licensed under the MIT license