Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Mar 18, 2024

This new class initially contains the following methods:

  • hasByteOrderMark(File $phpcsFile): string|false to determine whether a file starts with a byte order mark and if so, which type of byte order mark.
  • hasSheBang(File $phpcsFile): bool to determine whether a file starts with a shebang line.

Includes tests.

Copy link

@andrewnicols andrewnicols left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jrfnl,

This change looks good to me and I believe you cover all of the cases I can think of.

The only thing I have to note is a typo on recognized in the test docblocks reocgnized.

@jrfnl jrfnl force-pushed the utils/new-fileinfo-class branch from 343de4f to 45581b5 Compare March 24, 2024 22:15
@jrfnl
Copy link
Member Author

jrfnl commented Mar 24, 2024

@andrewnicols Thanks for catching that typo! I've fixed it up in the existing commit now.

@jrfnl jrfnl force-pushed the utils/new-fileinfo-class branch from 45581b5 to 8f6c2f8 Compare May 10, 2024 05:50
This new class initially contains the following methods:
* `hasByteOrderMark(File $phpcsFile): string|false` to determine whether a file starts with a byte order mark and if so, which type of byte order mark.
* `hasSheBang(File $phpcsFile): bool` to determine whether a file starts with a shebang line.

Includes tests.
@jrfnl jrfnl force-pushed the utils/new-fileinfo-class branch from 8f6c2f8 to c41ab20 Compare May 20, 2024 18:05
@jrfnl
Copy link
Member Author

jrfnl commented May 20, 2024

Rebased without changes. Merging once the build passes.

@jrfnl jrfnl merged commit 4a18f11 into develop May 20, 2024
@jrfnl jrfnl deleted the utils/new-fileinfo-class branch May 20, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants