https://github.com/phmlabs/namespaceanalyzer
Namespace Analyzer - This tool will check if all used (T_USE) namespaces are needed in a given PHP file.
https://github.com/phmlabs/namespaceanalyzer
Last synced: about 1 year ago
JSON representation
Namespace Analyzer - This tool will check if all used (T_USE) namespaces are needed in a given PHP file.
- Host: GitHub
- URL: https://github.com/phmlabs/namespaceanalyzer
- Owner: phmLabs
- Created: 2012-06-15T16:06:26.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2014-05-24T18:04:48.000Z (about 12 years ago)
- Last Synced: 2025-03-22T00:44:17.304Z (over 1 year ago)
- Language: PHP
- Homepage: http://www.phmlabs.com
- Size: 163 KB
- Stars: 9
- Watchers: 2
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Namespace Analyzer
==================
[](http://travis-ci.org/phmLabs/NamespaceAnalyzer)
This tool will check if all used (*T_USE*) namespaces are needed in a given PHP file.
Installation
------------
Require with [`Composer`](http://getcomposer.org)
``` json
{
"require": {
"phm/namespace-analyzer": "*"
}
}
```
Installation from Source
------------------------
``` sh
git clone https://github.com/phmLabs/NamespaceAnalyzer.git
```
**Fetch Dependencies with Composer**
``` sh
$ 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
``` sh
$ php bin/compile
```
from now on you can use the PHAR as follows `php namespace-analyzer.phar analyze PATH/TO/CHECK`
Example
-------
**Single File**
``` sh
$ php bin/console analyze example/unusednamespace.php
```
**Directory**
``` sh
$ php bin/console analyze example
```
Tests
-----
TODO