colinodell/indentation
Detect, convert, and normalize whitespace indentation in PHP strings. This small utility identifies whether text uses tabs or spaces, measures indent width, and converts between styles—useful for diffing, formatting, and code generation where consistent indentation matters.
Consider it when:
Look elsewhere / be cautious when:
To executives: This is a tiny, MIT-licensed utility that handles one fiddly problem — figuring out how a piece of text or file is indented and converting it. It's not a platform or a strategic bet; think of it as a reliable helper that lets us ship a formatting/config feature without us re-implementing edge cases ourselves. Cost and lock-in are near zero, and it can be replaced in an afternoon if needed. The main caveat is that it hasn't been updated since 2022, so we'd pin the version and keep the integration thin.
To engineering: colinodell/indentation gives us indentation detection and conversion for strings and files, hiding the messy cases (mixed tabs/spaces, varying widths, blank lines). It's a small, focused dependency with no framework lock-in — good fit for code-snippet rendering, config ingestion, or CLI scaffolding. Caveats: low maintenance activity (last release 2022, modest star count), so wrap it behind a thin internal interface, pin the version, and treat it as replaceable. It is not a formatter — if we need full styling/linting, reach for a dedicated tool and use this only for the indent-specific slice.
How can I help you explore Laravel packages today?