phm/namespace-analyzer

Php Namespace Analyzer

dev-master 2014-05-24 18:04 UTC

This package is auto-updated.

Last update: 2024-10-29 03:58:36 UTC


README

Build Status

This tool will check if all used (T_USE) namespaces are needed in a given PHP file.

Installation

Require with Composer

    {
        "require": {
            "phm/namespace-analyzer": "*"
        }
    }

Installation from Source

git clone https://github.com/phmLabs/NamespaceAnalyzer.git

Fetch Dependencies with Composer

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update --dev

Creating the PHAR

(make sure your php.ini settings allows creating PHAR Archives

$ php bin/compile

from now on you can use the PHAR as follows php namespace-analyzer.phar analyze PATH/TO/CHECK

Example

Single File

$ php bin/console analyze example/unusednamespace.php

Directory

$ php bin/console analyze example

Tests

TODO