Skip to content

ohnotnow/laravel-find-unused-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is little ugly hack of a console command to list unused methods from Laravel projects.

Installation

Just copy the FindUnusedMethods.php and/or FindUnusedClasses.php files to your app/Console/Commands/ directory.

Usage

Run :

php artisan findunused:methods
php artisan findunused:classes

Details

This just looks for any function nameOfThing definitions in your app directory, then looks for any matching calls to nameOfThing elsewhere in your app or views directories. It's a very 'dumb' match so don't take this as 100% truth. It does an ok job of spotting unused methods and will ignore certain laravel conventions such as ignoring handle methods on generated classes, CRUD methods on controllers.

Much the same hackyness for the 'classes' version.

Just to repeat, it is very hacky.

About

Find unused code in laravel projects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages