mrkindy/deadscanner

Laravel console command to list dead methods and classes from Laravel projects.

V1.0.1 2024-04-02 18:33 UTC

This package is auto-updated.

Last update: 2025-04-30 20:52:41 UTC


README

Efficiently identify and prune dead methods and Controllers to keep your codebase clean and maintainable.

Features

  • Pinpoints Unused Methods and Controllers: Detects methods and Controllers that aren't actively utilized within your project.
  • Customizable Scanning: Target specific paths for analysis and exclude namespaces as needed.
  • Flexible Output Formats: View results concisely in text format or obtain a detailed dump for in-depth analysis.
  • Easy Integration: Seamlessly integrates into your Laravel workflow with straightforward installation and usage.

Installation

Add DeadScanner to your project using Composer:

composer require mrkindy/deadscanner

Usage

Run the following commands to scan your project for dead code:

  • Find dead Controllers:

    php artisan mrkindy:deadcontroller
  • Find dead methods:

    php artisan mrkindy:deadmethods

Arguments:

  • paths: Optional list of specific paths to scan.

Options:

  • --dump-output: Outputs a detailed dump of dead code findings for comprehensive analysis.
  • --text-output: Presents results in a concise text format for quick overview.

Contributing

We appreciate contributions! Please refer to the CONTRIBUTING.md file for details on how to get involved.

Credits

License

The MIT License (MIT). Please see License File for more information.