Skip to content

Code clean-up #22

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

Merged
merged 10 commits into from
Aug 25, 2024
Merged

Code clean-up #22

merged 10 commits into from
Aug 25, 2024

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Aug 18, 2024

This PR is fixing some basic issues which have been found via static analysis. To not endorse any particular static PHP analyser, we do not add it to the repo, and won't even tell its name.

Our main focus is on keeping BC as much as sensible, and to not break the existing code, but only to make minor adjustments to make the code better understable, and amenable to further static analysis and general improvements,

cmb69 added 10 commits August 18, 2024 22:04
While PHP doesn't require this, it is good style, and makes the code
easier to reason about.
While `Config::getSdkNugetFeedUrl()` is not used from within the
project, and probably just was some experimental stuff, the method is
public, so we better keep it for now, but avoid reading an undeclared
class variable.
These are retrieved from within the called functions, what *might* not
be the best idea, but it's what we have for now.
In practice, it's either "copy" or "rename".
From looking at the code, it seems so, but let's make sure before
reading an undefined variable.
While that is changing the signature of a public method, it makes no
sense to return a string, and later to convert to int again.
There shouldn't be the need for even having an interface (an abstract
class should be sufficient), but we keep the interface for now.
@cmb69
Copy link
Member Author

cmb69 commented Aug 18, 2024

Kudos to @ondrejmirtes!

@cmb69 cmb69 merged commit a047c66 into php:master Aug 25, 2024
@cmb69 cmb69 deleted the cmb/clean-up branch August 25, 2024 16:04
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.

1 participant