spatie / laravel-model-cleanup

Clean up unneeded records
https://freek.dev/410-a-laravel-package-to-clean-up-models
MIT License
399 stars 42 forks source link

Type error on run in getFullyQualifiedClassNameFromFile #14

Closed francislavoie closed 6 years ago

francislavoie commented 6 years ago

Type error: Return value of Spatie\ModelCleanup\CleanUpModelsCommand::getFullyQualifiedClassNameFromFile() must be of the type string, null returned

This seems to happen if when using a glob for the models config, there are some files that don't contain classes (such as traits for example). It should probably filter those out.

The config I'm using is app_path('Models/*'),

freekmurze commented 6 years ago

We'll handle this in #15