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

Issue #43: Introduce phpcs, fix code style issues, add meaningful doc comments. #53

Closed
wants to merge 18 commits into from

Conversation

donquixote
Copy link
Collaborator

@donquixote donquixote commented Nov 8, 2024

Fixes #43

This depends on other issues which should be merged first:

The github action only runs in the fork repo for now, until #28 is merged.

@donquixote donquixote changed the title Issue #43: Introduce phpcs, fix code style issues. Issue #43: Introduce phpcs, fix code style issues, add meaningful doc comments. Nov 8, 2024
@hfiguiere
Copy link
Collaborator

To be manageable I would start with a patch that is the result of running phpcbf. Then I would also group all the documentation fixes in a single patch.

This would be the two biggest one, out of the way and then moving on to the other fixes.

@donquixote
Copy link
Collaborator Author

@hfiguiere
Actually the main problem right now is that this depends on #28 which is not merged yet.
This makes the PR look bigger than it is.
The reason to start with #28 is that it gives us the CI pipeline which then also runs phpcs.

To be manageable I would start with a patch that is the result of running phpcbf. Then I would also group all the documentation fixes in a single patch.

Actually I did run phpcbf, BUT I did so piecemeal, with more and more rules enabled.
The individual commits become easier to review this way.
Otherwise, the more interesting changes get drowned in whitespace change.
The comments are already a separate commit.

@donquixote
Copy link
Collaborator Author

I realize now that #28 was squash-merged.

@donquixote
Copy link
Collaborator Author

Also, as earlier, I would suggest to do a regular merge, no squash, no fast-forward.
This keeps the individual commits, but on a separate timeline, like so:

*   fbb76fb1 (HEAD -> main) Merge branch 'issue-43-phpcs'
|\  
| * 7d7c959e (g/issue-43-phpcs, issue-43-phpcs) Issue #43: Put array closing bracket on new line.
| * 5ffe54d9 Issue #43: Run phpcs in github action.
| * 66c71b57 Issue #43: Add customized phpcs.xml that passes.
| * db0deebf Issue #43: Fix indentation to current package standard.
| * 799c7330 Issue #43: Mark parameter as nullable if it has NULL default value.
| * 1dafbc76 Issue #43: Remove unused imports.
| * 92c63d5a Issue #43: Fix inline comments.
| * 2b981d2e Issue #43: Put inline comment on separate line.
| * 63579ed4 Issue #43: NULL, TRUE and FALSE in uppercase.
| * d74b75a0 Issue #43: Add public access modifier.
| * fa3228c9 Issue #43: Normalize spaces.
| * 6103caf5 Issue #43: Add trailing comma.
| * 30c343ae Issue #43: Put catch and else on new line.
| * ee27c915 Issue #43: Normalize blank lines.
| * d598b2bd Issue #43: Remove unreachable break in switch, fix indentation.
| * 855cded3 Issue #43: Explicitly return NULL, to avoid inconsistent return points.
| * f09dce4d Issue #43: Enhance docs.
| * 58d465d7 Issue #43: Add inline `@var` doc for static analysis.
|/  
* 52d44862 Issue #28: docker-compose, github action, and one test. (#48)

Having these types of merge commits is totally fine and does not mess up the history.

@donquixote
Copy link
Collaborator Author

I created two new PRs, one depending on the other:

@hfiguiere hfiguiere added this to the 0.9.0-beta6 milestone Nov 15, 2024
@donquixote
Copy link
Collaborator Author

I think this one will be obsolete.

@donquixote donquixote closed this Nov 15, 2024
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.

Setup phpcs (+ license discussion)
2 participants