Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ New FileInfo utility class #572

Merged
merged 1 commit into from
May 20, 2024
Merged

✨ New FileInfo utility class #572

merged 1 commit into from
May 20, 2024

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
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
54 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants