PHPCSStandards / PHPCSUtils

A suite of utility functions for use with PHP_CodeSniffer
https://phpcsutils.com/
GNU Lesser General Public License v3.0
53 stars 7 forks source link

:sparkles: New `FilePath` utility class #593

Closed jrfnl closed 3 months ago

jrfnl commented 4 months ago

... with some utility functions for handling file paths.

The class initially contains the following utility methods:

Includes unit tests.

jrfnl commented 4 months ago

Rebased without changes. Setting to draft as this PR depends on https://github.com/PHPCSStandards/PHPCSUtils/pull/550, which has to be merged first.

jrfnl commented 3 months ago

Rebased without changes after the merge of PR #550.

jrfnl commented 3 months ago

Rebased without changes. Marking as ready as https://github.com/PHPCSStandards/PHPCSUtils/pull/550 has been merged now. Merging once the build passes.

Note: I've looked the sniff over to check if any of the new exceptions from PR #598 should be implemented and concluded that things should be fine as-is. In all methods, it is either handled gracefully already or a param will be passed to a PHP native function, which may throw a type error. I think that should be sufficient.