PHPackages                             phm/namespace-analyzer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phm/namespace-analyzer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phm/namespace-analyzer
======================

Php Namespace Analyzer

9164[5 issues](https://github.com/phmLabs/NamespaceAnalyzer/issues)PHPCI failing

Since May 24Pushed 11y ago2 watchersCompare

[ Source](https://github.com/phmLabs/NamespaceAnalyzer)[ Packagist](https://packagist.org/packages/phm/namespace-analyzer)[ RSS](/packages/phm-namespace-analyzer/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Namespace Analyzer
==================

[](#namespace-analyzer)

[![Build Status](https://camo.githubusercontent.com/dd7eea4551b01b002ae6ef1f90e644bc4c40cf6eb1b36522cef0b707e1c7523a/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f70686d4c6162732f4e616d657370616365416e616c797a65722e706e67)](http://travis-ci.org/phmLabs/NamespaceAnalyzer)

This tool will check if all used (*T\_USE*) namespaces are needed in a given PHP file.

Installation
------------

[](#installation)

Require with [`Composer`](http://getcomposer.org)

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

Installation from Source
------------------------

[](#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
-----------------

[](#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
-------

[](#example)

**Single File**

```
$ php bin/console analyze example/unusednamespace.php
```

**Directory**

```
$ php bin/console analyze example
```

Tests
-----

[](#tests)

TODO

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance9

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/484ac8fdab8874b46d6890cba143e75f6ed5369749d35c76a8ca87fa5857ebc0?d=identicon)[phmLabs](/maintainers/phmLabs)

---

Top Contributors

[![NilsLangner](https://avatars.githubusercontent.com/u/612426?v=4)](https://github.com/NilsLangner "NilsLangner (3 commits)")[![tfnet](https://avatars.githubusercontent.com/u/930122?v=4)](https://github.com/tfnet "tfnet (3 commits)")[![digitalkaoz](https://avatars.githubusercontent.com/u/293591?v=4)](https://github.com/digitalkaoz "digitalkaoz (1 commits)")

### Embed Badge

![Health badge](/badges/phm-namespace-analyzer/health.svg)

```
[![Health](https://phpackages.com/badges/phm-namespace-analyzer/health.svg)](https://phpackages.com/packages/phm-namespace-analyzer)
```

###  Alternatives

[greenter/greenter

Facturacion Electrónica SUNAT en Perú

31530.2k1](/packages/greenter-greenter)[tiesa/ldap

LDAP made easy &amp; practical to use in PHP

5796.2k1](/packages/tiesa-ldap)[opanegro/nova-custom-controller

Make custom controller in Laravel Nova

144.4k](/packages/opanegro-nova-custom-controller)[jazzsequence/dashboard-changelog

Adds a GitHub release widget to your WordPress dashboard for a public GitHub repository.

151.2k](/packages/jazzsequence-dashboard-changelog)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
