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

Php diff 120 #128

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Php diff 120 #128

wants to merge 7 commits into from

Conversation

JBlond
Copy link
Owner

@JBlond JBlond commented Nov 18, 2024

No description provided.

@JBlond JBlond requested a review from DigiLive November 18, 2024 13:32
@DigiLive
Copy link
Collaborator

Hey,

Of course I'm willing to do a review for you, but you'll have to grant me some time.

Aside from work, I'm also active in some other projects which require my attention.

@JBlond
Copy link
Owner Author

JBlond commented Nov 19, 2024

You don't need to worry about time. Do it whenever you find time.

Copy link
Collaborator

@DigiLive DigiLive left a comment

Choose a reason for hiding this comment

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

Assumming you'll still need to cleanup/format the code, but...

  • The files (ex. the eol resources) have an incorrect line seperator.
  • Docblocks are missing or unfinshed.
  • Since the endings don't change after the file is loaded, you could execute the different methods immediately after loading a file, store the values as properties and use getters for these properties.

Also, I left in-file comments.

{
$lastLine = $this->getLastLine();
if (strpos($lastLine, "\r\n") !== false) {
return "EOL type is Windows (CRLF)";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Double quotes can be replaced by single quotes

Copy link
Owner Author

Choose a reason for hiding this comment

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

it can't be replaced. if I replace it with single quotes the unit test fails.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The comment is referring to line 72, not 71.

}

if (strpos($lastLine, "\r") !== false) {
return "EOL type is Mac (CR)";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Double quotes can be replaced by single quotes

Copy link
Owner Author

Choose a reason for hiding this comment

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

it can't be replaced. if I replace it with single quotes the unit test fails.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The comment is referring to line 76, not 75.

}

if (strpos($lastLine, "\n") !== false) {
return "EOL type is Unix (LF)";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Double quotes can be replaced by single quotes

Copy link
Owner Author

Choose a reason for hiding this comment

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

it can't be replaced. if I replace it with single quotes the unit test fails.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The comment is referring to line 80, not 79.

@DigiLive
Copy link
Collaborator

Also, If I'm not mistaken, I notice now, the line separators (\r\n) of the php files differ from the project settings (\n).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants