Directory setting can be overridden
The way a directory is sanitized can be overridden
The way options are handled can be overridden
I separated the options handling even though I didn't need it for my use-case, just in case anyone may need that later. Would have been funny for me to split half the constructor but not the other half.
Also for my use case I didn't need to do anything except change the way the way the dir is sanitized ( ie not using realpath in certain situation ). Still made that method so if someone had something more advanced (like an object managing config) to get directories, they could handle it.
Directory setting can be overridden The way a directory is sanitized can be overridden The way options are handled can be overridden
I separated the options handling even though I didn't need it for my use-case, just in case anyone may need that later. Would have been funny for me to split half the constructor but not the other half.
Also for my use case I didn't need to do anything except change the way the way the dir is sanitized ( ie not using realpath in certain situation ). Still made that method so if someone had something more advanced (like an object managing config) to get directories, they could handle it.
Still 100% coverage of course