PHP8.2 Static analysis issues for advagg

Created on 7 March 2024, 9 months ago
Updated 27 March 2024, 8 months ago

Fix the following issues found by phpstan run

advagg/advagg.advagg.inc
259 Negated boolean expression is always true.

advagg/advagg.cache.inc
828 Function advagg_refresh_all_locale_files() should return int but returns array.
859 Function advagg_refresh_all_locale_files() should return int but returns array.
944 Function advagg_detect_subfile_changes() should return bool but returns array.

advagg/advagg.inc
794 Result of function clearstatcache (void) is used.
797 Result of function clearstatcache (void) is used.
1362 Function advagg_create_subfile() should return array but returns false.

advagg/advagg.install
1892 Function advagg_install_s3fs_proxy_settings invoked with 1 parameter, 0 required.
2501 Function advagg_install_apache_mod_loaded() should return bool but returns null.
2550 Function advagg_install_change_table_collation() should return array but returns false.

advagg/advagg.missing.inc
1000 Function advagg_get_css_aggregate_contents() should return string but returns array.
1076 Function advagg_get_js_aggregate_contents() should return string but returns array.

advagg/advagg.module
5210 Function _advagg_load_stylesheet() should return array but returns string.
5223 Function _advagg_load_stylesheet() should return array but returns string|null.
5531 Function advagg_get_github_version_json() should return string but returns int.

advagg/advagg_bundler/advagg_bundler.module
156 Negated boolean expression is always true.

advagg/advagg_ext_compress/advagg_ext_compress.module
97 Function advagg_ext_compress_execute_cmd() should return string but returns false.

advagg/advagg_js_compress/jshrink.inc
318 Method JShrink\Minifier::getChar() should return string but returns false.
596 Method JShrink\Minifier::lock() should return bool but returns string.
604 Method JShrink\Minifier::lock() should return bool but returns string|null.
616 Method JShrink\Minifier::unlock() should return bool but returns string.
623 Method JShrink\Minifier::unlock() should return bool but returns string.

advagg/advagg_js_compress/jsminplus.inc
949 Access to an undefined property JSNode::$condition. (multiple warnings)

advagg/advagg_js_compress/jsqueeze.inc
930 Access to an undefined property Patchwork\JSqueeze::$local_tree.
931 Access to an undefined property Patchwork\JSqueeze::$used_tree.

advagg/advagg_relocate/advagg_relocate.advagg.inc
175 Argument of an invalid type string supplied for foreach, only iterables are supported.
700 Function advagg_relocate_get_remote_font_data() should return array but returns false.
703 Function advagg_relocate_get_remote_font_data() should return array but returns false.

πŸ“Œ Task
Status

Needs work

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
  • PHP 8.2

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024