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

Add phpmd #92

Merged
merged 7 commits into from
Jul 24, 2024
Merged

Add phpmd #92

merged 7 commits into from
Jul 24, 2024

Conversation

phily245
Copy link
Contributor

@phily245 phily245 commented Jul 24, 2024

Adds PHPMD and the clean code ruleset.

#86

We can now test against these
These can lead to PHP notice errors
This adheres more to PHPMD's definition of clean code
This always passed if the command fails top return a pending command
This could be an early return and reduce the cyclomatic complexity
According to PHP Mess Detector:

"Assignments in if clauses and the like are considered a code smell.
Assignments in PHP return the right operand as their result. In many
cases, this is an expected behavior, but can lead to many difficult to
spot bugs, especially when the right operand could result in zero, null
or an empty string."
We can start aligning the code now
@phily245 phily245 merged commit 048aba2 into v2.0 Jul 24, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant