PHPackages                             22h/code-analyser - 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. 22h/code-analyser

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

22h/code-analyser
=================

v0.1(8y ago)2241proprietaryPHPPHP &gt;=7.1CI failing

Since Sep 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/22h/code-analyser)[ Packagist](https://packagist.org/packages/22h/code-analyser)[ RSS](/packages/22h-code-analyser/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

code analyser
=============

[](#code-analyser)

**This repository is experimental.**

With this repository I want to solve some problems of my own projects. For example, incorrect namespaces in unit tests.

PHP Unit doesn't need namespaces and therefore they are often wrong.

install
-------

[](#install)

you only need composer

```
composer require 22h/code-analyser --dev

```

commands
--------

[](#commands)

search exceptions in all autoload folders

```
bin/code-analyser code-analyser:exceptions

```

search exceptions in vendor folder recursive

```
bin/code-analyser code-analyser:exceptions -d vendor

```

search incorrect namespaces in autoload folders

```
bin/code-analyser code-analyser:namespaces

```

example output namespace
------------------------

[](#example-output-namespace)

```
$ php code-analyser code-analyser:namespaces

Lookup autoload paths
---------------------

 ------ ------------------------------- --------
  env    namespace                       folder
 ------ ------------------------------- --------
  prod   TwentyTwo\CodeAnalyser\         src
  dev    TwentyTwo\CodeAnalyser\Tests\   tests
 ------ ------------------------------- --------

Search matching files
---------------------

 Find 11 matching files in directories

Search incorrect namespaces
---------------------------

 11/11 [============================] 100%

List incorrect namespaces
-------------------------

 ------------------- ------------------------------------
  File                tests/\Test\Wrang.php
  Current Namespace   TwentyTwo\CodeAnalyserA\Tests\Test
  New Namespace       TwentyTwo\CodeAnalyser\Tests\Test
 ------------------- ------------------------------------

 ------------------- -------------------------------
  File                tests/\Wrong.php
  Current Namespace   TwentyTwo\CodeAnalyser2\Tests
  New Namespace       TwentyTwo\CodeAnalyser\Tests
 ------------------- -------------------------------
```

example output exceptions
-------------------------

[](#example-output-exceptions)

```
$ php code-analyser code-analyser:exceptions

Lookup autoload paths
---------------------

 ------ ------------------------------- --------
  env    namespace                       folder
 ------ ------------------------------- --------
  prod   TwentyTwo\CodeAnalyser\         src
  dev    TwentyTwo\CodeAnalyser\Tests\   tests
 ------ ------------------------------- --------

Search matching files
---------------------

 Find 12 matching files in directories

Search exceptions
-----------------

 12/12 [============================] 100%

List founded exceptions
-----------------------

 ------------------------------- ----------------------------------
  exception                       files
 ------------------------------- ----------------------------------
  ComposerFileNotFoundException   src\Composer.php
  ComposerFileNotFoundException   tests/\Test\Wrang.php
  FileNotFoundException           src\Autoload\CheckFile.php
  FileNotFoundException           src\FindExceptions\CheckFile.php
  Exception                       tests/\Test\Wrang.php
 ------------------------------- ----------------------------------

List grouped exceptions
-----------------------

 ------------------------------- -------
  exception                       count
 ------------------------------- -------
  ComposerFileNotFoundException   2
  FileNotFoundException           2
  Exception                       1
 ------------------------------- -------

 [OK] find 5 exceptions

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% of commits — single point of failure

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3169d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7baaa438266923e35e4b9149a05a0063c6179ae6d379f14b66d1948b61ddc976?d=identicon)[22h](/maintainers/22h)

---

Top Contributors

[![22h](https://avatars.githubusercontent.com/u/7404734?v=4)](https://github.com/22h "22h (13 commits)")[![karlsve](https://avatars.githubusercontent.com/u/1113468?v=4)](https://github.com/karlsve "karlsve (1 commits)")

### Embed Badge

![Health badge](/badges/22h-code-analyser/health.svg)

```
[![Health](https://phpackages.com/badges/22h-code-analyser/health.svg)](https://phpackages.com/packages/22h-code-analyser)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)

PHPackages © 2026

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