Skip to content

refactor: coding standards LINE ENDINGS missmatch #83

@hanoii

Description

@hanoii

Follow up to #80

I noticed something else, all files have CRLF, PSR-12 also states that all files should end in Unix style LF:

https://www.php-fig.org/psr/psr-12/#22-files

All PHP files MUST use the Unix LF (linefeed) line ending only.
All PHP files MUST end with a non-blank line, terminated with a single LF.

I would also add a .gitattributes file to enforce this.

Something like :

# Default: all detected text files use LF in the repo and in checkouts
* text=auto eol=lf

# Keep Windows-native scripts CRLF if you actually need them that way (optional)
# *.bat text eol=crlf
# *.cmd text eol=crlf
# *.ps1 text eol=crlf

LF is the pretty much the ubiquitous line ending. I assume you are on windows but it can still be used this way and you can play with git core.autocrlf setting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions