tomasvotruba / class-leak
Detect leaking classes
Fund package maintenance!
tomasvotruba
www.paypal.me/rectorphp
Installs: 592 946
Dependents: 37
Suggesters: 0
Security: 0
Stars: 102
Watchers: 3
Forks: 7
Open Issues: 0
Requires
- php: >=7.2
- dev-main
- 2.0.0
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.2.16
- 0.2.15
- 0.2.14
- 0.2.13
- 0.2.12
- 0.2.11
- 0.2.10
- 0.2.9
- 0.2.8
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.3
- 0.1.2.72
- 0.1.2
- 0.1.1.72
- 0.1.1
- 0.1.0.72
- 0.1.0
- 0.0.22.72
- 0.0.22
- 0.0.21.72
- 0.0.21
- 0.0.20.72
- 0.0.20
- 0.0.19.72
- 0.0.19
- 0.0.18.72
- 0.0.18
- 0.0.17.72
- 0.0.17
- 0.0.16.72
- 0.0.16
- 0.0.15.72
- 0.0.15
- 0.0.14.72
- 0.0.14
- 0.0.13.72
- 0.0.13
- 0.0.12.72
- 0.0.12
- 0.0.11.72
- 0.0.11
- 0.0.10
- 0.0.9.72
- 0.0.9
- 0.0.8.72
- 0.0.8
- 0.0.7.72
- 0.0.7
- 0.0.6.72
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-tv-parser-5
- dev-tv-second-progress-bar
This package is auto-updated.
Last update: 2024-12-12 11:53:55 UTC
README
Find leaking classes that you never use... and get rid of them.
Install
composer require tomasvotruba/class-leak --dev
Usage
Pass directories you want to check:
vendor/bin/class-leak check src
Make sure to exclude /tests
directories, to keep reporting classes that are used in tests, but never used in the code-base.
Many types are excluded by default, as they're collected by framework magic, e.g. console command classes.
Exclude what you use
Do you want to skip classes of certain type?
vendor/bin/class-leak check src --skip-type="App\\Contract\\SomeInterface"
What if your classes do no implement any type?
vendor/bin/class-leak check src --skip-suffix="Controller"
Do you want to skip classes using a specific attribute?
vendor/bin/class-leak check src --skip-attribute="App\\Attribute\\AsController"
Happy coding!