migrify/static-detector

Detect static calls in your project

0.3.51 2020-10-23 15:52 UTC

This package is auto-updated.

Last update: 2020-10-25 12:27:15 UTC


README

Downloads total

Detect static and its calls in your project!

Install

composer require migrify/static-detector --dev

Usage

vendor/bin/static-detector detect src

Configuration

Do you want to look only on specific classes? Just create static-detector.php config in your root and add filter them:

<?php

declare(strict_types=1);

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Migrify\StaticDetector\ValueObject\Option;

return static function (ContainerConfigurator $containerConfigurator): void {
    $parameters = $containerConfigurator->parameters();
    $parameters->set(Option::FILTER_CLASSES, [
        '*\\Helpers'
    ]);
};

That's it :)

Report Issues

In case you are experiencing a bug or want to request a new feature head over to the migrify monorepo issue tracker

Contribute

The sources of this package are contained in the migrify monorepo. We welcome contributions for this package on migrify/migrify.