Download the PHP package laravel-analyzer/cli without Composer

On this page you can find all versions of the php package laravel-analyzer/cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cli

๐Ÿ” Laravel Best Practices Analyzer CLI

A command-line tool for analyzing the quality and security of Laravel projects. Zero external dependencies โ€” pure PHP only.


๐Ÿ“ฆ Installation

Option A โ€” Direct use (no composer install required)

Option B โ€” Global via Composer


๐Ÿš€ Usage


๐Ÿ“Š Analysis Modules

๐Ÿ”— Coupling & Cohesion (coupling)

Detects violations of the Single Responsibility Principle (SRP).

Metric Description
Average coupling Number of dependencies per class
God Classes Classes with > 20 methods or > 500 lines
Long methods Methods with > 50 lines
Estimated cohesion How related the class responsibilities are

How to improve?


๐Ÿงช Test Coverage (testing)

Evaluates the quality and coverage of the test suite.

Metric Description
Unit tests Files in tests/Unit/
Feature tests Files in tests/Feature/
Test/code ratio % of source files with associated tests
Line coverage From clover.xml (if present)

To generate a coverage report:


๐Ÿ’ธ Technical Debt (debt)

Identifies indicators of accumulated technical debt.

Indicator Severity
FIXME HIGH
HACK / XXX MEDIUM
TODO LOW
$guarded = [] CRITICAL
Model::create($request->all()) CRITICAL
Dependencies with wildcard version * HIGH
Large commented-out code blocks MEDIUM

๐Ÿงฎ Refactoring Complexity (complexity)

Analyzes the Cyclomatic Complexity (CC) of each method.

CC Risk Description
1โ€“5 Low Simple, easy to test
6โ€“10 Medium Moderate, testable
11โ€“20 High Hard to test
> 20 Critical Practically untestable

Formula: CC = 1 + (if + for + foreach + while + case + catch + && + \|\|)


๐Ÿ”’ Laravel Security (security)

Detects vulnerabilities specific to the Laravel ecosystem.

Vulnerability OWASP Dangerous example
SQL Injection A03 DB::select("SELECT * WHERE id=" . $id)
Mass Assignment A01 Model::create($request->all())
XSS A03 {!! $userInput !!}
Command Injection A03 shell_exec("ls " . $path)
Weak Hashing A02 md5($password)
Open Redirect A01 redirect($request->get('url'))
Debug in prod A05 APP_DEBUG=true + APP_ENV=production

๐Ÿ›ก๏ธ OWASP Top 10 (owasp)

Checks the project against the OWASP Top 10 standard (2021).

Code Category What it checks
A01 Broken Access Control Policies, IDOR, protected routes
A02 Cryptographic Failures MD5/SHA1, hardcoded secrets, HTTPS
A03 Injection SQL, Command, Object injection
A04 Insecure Design Rate limiting, validation on store/update
A05 Security Misconfiguration APP_DEBUG, SameSite cookies, CORS
A06 Vulnerable Components Dependency versions, composer.lock
A07 Auth Failures Session fixation, MFA, regeneration
A08 Integrity Failures CI/CD, unserialize(), secure pipelines
A09 Logging Failures Security events logged
A10 SSRF HTTP requests with user-supplied URLs

๐Ÿ“‹ Output Formats

Console (default)

Colorized terminal view with progress bars.

JSON

HTML

Full visual report with tables, progress bars, and OWASP breakdown.

Markdown

Compatible with GitHub/GitLab. Ideal for PRs or documentation wikis.


๐Ÿ”„ CI/CD Integration

GitHub Actions

GitLab CI


๐Ÿ› ๏ธ Complementary Tools

Tool Installation Purpose
Larastan/PHPStan composer require --dev nunomaduro/larastan Advanced static analysis
Laravel Pint Included in Laravel 9+ Code formatting
Enlightn composer require --dev enlightn/enlightn Security audit
PHP Insights composer require nunomaduro/phpinsights Quality metrics
PHPMD composer require --dev phpmd/phpmd Code smell detection

๐Ÿ“ˆ Score Interpretation

Score Grade Meaning
90โ€“100 A+ Excellent quality
80โ€“89 A Very good quality
70โ€“79 B Good quality, minor improvements needed
60โ€“69 C Acceptable quality, work needed
50โ€“59 D Low quality, urgent refactoring required
< 50 F Critical quality, high risk

๐Ÿ“ License

MIT License โ€” Free for commercial and personal use.


All versions of cli with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laravel-analyzer/cli contains the following files

Loading the files please wait ...