-
Notifications
You must be signed in to change notification settings - Fork 76
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
[static-analysis] Fix static analysis level 2 errors. #679
base: develop
Are you sure you want to change the base?
Conversation
1b17dbe
to
2419e91
Compare
bfd1c8d
to
48aaba0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bahiirwa please see my comments, thanks.
@@ -14323,6 +14320,7 @@ private function get_parent_and_addons_installs_info() { | |||
) | |||
); | |||
|
|||
$installed_addons_ids_map = array_flip( $installed_addons_ids ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is a bug fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@swashata Yes, it is. Caught it while doing the checks. Should we push this in another PR?
includes/class-freemius.php
Outdated
@@ -20061,7 +20057,7 @@ private function _store_licenses( $store = true, $module_id = false, $licenses = | |||
} | |||
} | |||
|
|||
if ( ! empty( $new_user_licenses_map ) ) { | |||
if ( count( $new_user_licenses_map ) > 0 ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something PHPStan is forcing us to do?
6ee7406
to
fe76177
Compare
e47c49a
to
ae44f1c
Compare
5999f7f
to
2bef074
Compare
…. 2 parameters given but 1 required.
…iables are misnamed in code that follows.
… property object.
2bef074
to
aff954f
Compare
Proposed changes
count()
You can advise on that. The goal was to maintain the checks in place and not modify functionality.