Closed deoomen closed 5 months ago
Hi,
not at the moment. It could be an option --require-interface
.
Could you add it to the command to handle it?
I tried:
vendor/bin/swiss-knife finalize-classes src --require-interface
but:
The "--require-interface" option does not exist.
We don't have that option.
Would you add it via PR?
Oh, I misunderstood you, sorry.
I could try, but at the moment I have very little time after hours, so I don't know when it could be done.
Could you briefly describe what should be changed?
The option must be added in the configure() method, then processed in execute() method: https://github.com/rectorphp/swiss-knife/blob/main/src/Command/FinalizeClassesCommand.php#L38-L56
Feel free to send PR when your free :+1: Thank you
Closing as idea moved to PR phase
Hi!
Is there an option to only finalise classes that implement an interface or extend another class?
Like in
FinalizeClassesWithoutChildrenRector
.I don't want to change classes without extends/implements (
ThirdClass
).