Skip to content

Update PHPStan level to 6 #1203

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 30 commits into from
May 9, 2024
Merged

Update PHPStan level to 6 #1203

merged 30 commits into from
May 9, 2024

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented May 6, 2024

See #775.

This fixes the following PHPStan issues:

[ERROR] Found 381 errors
 ------ -------------------------------------------------------------------------------------- 
  Line   plugins/auto-sizes/hooks.php                                                          
 ------ -------------------------------------------------------------------------------------- 
  21     Function auto_sizes_update_image_attributes() has parameter $attr                     
         with no value type specified in iterable type array.                                  
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  21     Function auto_sizes_update_image_attributes() return type has no                      
         value type specified in iterable type array.                                          
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  80     Function auto_sizes_render_generator() has no return type specified.                  
 ------ -------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------- 
  Line   plugins/dominant-color-images/helper.php                                              
 ------ -------------------------------------------------------------------------------------- 
  51     Function dominant_color_get_dominant_color_data() return type has no                  
         value type specified in iterable type array.                                          
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
 ------ -------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------- 
  Line   plugins/dominant-color-images/hooks.php                                               
 ------ -------------------------------------------------------------------------------------- 
  23     Function dominant_color_metadata() has parameter $metadata with no                    
         value type specified in iterable type array.                                          
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  23     Function dominant_color_metadata() return type has no value type                      
         specified in iterable type array.                                                     
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  48     Function dominant_color_update_attachment_image_attributes() has                      
         parameter $attr with no value type specified in iterable type array.                  
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  162    Function dominant_color_add_inline_style() has no return type                         
         specified.                                                                            
  180    Function dominant_color_render_generator() has no return type                         
         specified.                                                                            
 ------ -------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------- 
  Line   plugins/embed-optimizer/hooks.php                                
 ------ ----------------------------------------------------------------- 
  108    Function embed_optimizer_lazy_load_scripts() has no return type  
         specified.                                                       
  166    Function embed_optimizer_trigger_error() has no return type      
         specified.                                                       
  180    Function embed_optimizer_render_generator() has no return type   
         specified.                                                       
 ------ ----------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   plugins/optimization-detective/storage/rest-api.php                    
 ------ ----------------------------------------------------------------------- 
  100    Function od_handle_rest_request() has parameter $request with generic  
         class WP_REST_Request but does not specify its types: T                
         💡 You can turn this off by setting                                    
            checkGenericClassInNonGenericObjectType: false in your              
            phpstan.neon.dist.                                                  
 ------ ----------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------- 
  Line   plugins/speculation-rules/class-plsr-url-pattern-prefixer.php                         
 ------ -------------------------------------------------------------------------------------- 
  27     Property PLSR_URL_Pattern_Prefixer::$contexts type has no value type                  
         specified in iterable type array.                                                     
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  37     Method PLSR_URL_Pattern_Prefixer::__construct() has parameter                         
         $contexts with no value type specified in iterable type array.                        
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  108    Method PLSR_URL_Pattern_Prefixer::get_default_contexts() return type                  
         has no value type specified in iterable type array.                                   
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
 ------ -------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------- 
  Line   plugins/speculation-rules/helper.php                                                  
 ------ -------------------------------------------------------------------------------------- 
  24     Function plsr_get_speculation_rules() return type has no value type                   
         specified in iterable type array.                                                     
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
 ------ -------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   plugins/speculation-rules/hooks.php                                    
 ------ ----------------------------------------------------------------------- 
  21     Function plsr_print_speculation_rules() has no return type specified.  
  56     Function plsr_render_generator_meta_tag() has no return type           
         specified.                                                             
 ------ ----------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   plugins/speculation-rules/settings.php                               
 ------ --------------------------------------------------------------------- 
  105    Function plsr_register_setting() has no return type specified.       
  141    Function plsr_add_setting_ui() has no return type specified.         
  199    Function plsr_render_settings_field() has no return type specified.  
 ------ --------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------- 
  Line   plugins/speculation-rules/uninstall.php                             
 ------ -------------------------------------------------------------------- 
  39     Function plsr_delete_plugin_option() has no return type specified.  
 ------ -------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------- 
  Line   plugins/webp-uploads/helper.php                                                       
 ------ -------------------------------------------------------------------------------------- 
  247    Function webp_uploads_get_attachment_sources() return type has no                     
         value type specified in iterable type array.                                          
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  274    Function webp_uploads_get_content_image_mimes() return type has no                    
         value type specified in iterable type array.                                          
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  329    Function webp_uploads_should_discard_additional_image_file() has                      
         parameter $additional with no value type specified in iterable type                   
         array.                                                                                
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  329    Function webp_uploads_should_discard_additional_image_file() has                      
         parameter $original with no value type specified in iterable type                     
         array.                                                                                
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
 ------ -------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------- 
  Line   plugins/webp-uploads/hooks.php                                                        
 ------ -------------------------------------------------------------------------------------- 
  44     Function webp_uploads_create_sources_property() has parameter                         
         $metadata with no value type specified in iterable type array.                        
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  44     Function webp_uploads_create_sources_property() return type has no                    
         value type specified in iterable type array.                                          
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  44     Function webp_uploads_create_sources_property() return type has no                    
         value type specified in iterable type array.                                          
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  241    Function webp_uploads_wp_get_missing_image_subsizes() has parameter                   
         $image_meta with no value type specified in iterable type array.                      
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  241    Function webp_uploads_wp_get_missing_image_subsizes() has parameter                   
         $missing_sizes with no value type specified in iterable type array.                   
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  241    Function webp_uploads_wp_get_missing_image_subsizes() return type has                 
         no value type specified in iterable type array.                                       
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  327    Function webp_uploads_remove_sources_files() has no return type                       
         specified.                                                                            
  682    Function webp_uploads_wepb_fallback() has no return type specified.                   
  734    Function webp_uploads_get_image_sizes_additional_mime_type_support()                  
         return type has no value type specified in iterable type array.                       
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  787    Function webp_uploads_render_generator() has no return type                           
         specified.                                                                            
 ------ -------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------- 
  Line   plugins/webp-uploads/image-edit.php                                                   
 ------ -------------------------------------------------------------------------------------- 
  25     Function webp_uploads_update_sources() has parameter $main_images                     
         with no value type specified in iterable type array.                                  
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  25     Function webp_uploads_update_sources() has parameter $metadata with                   
         no value type specified in iterable type array.                                       
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  25     Function webp_uploads_update_sources() has parameter $subsized_images                 
         with no value type specified in iterable type array.                                  
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  25     Function webp_uploads_update_sources() has parameter                                  
         $valid_mime_transforms with no value type specified in iterable type                  
         array.                                                                                
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  25     Function webp_uploads_update_sources() return type has no value type                  
         specified in iterable type array.                                                     
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  247    Function webp_uploads_update_attachment_metadata() has parameter                      
         $data with no value type specified in iterable type array.                            
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  247    Function webp_uploads_update_attachment_metadata() return type has no                 
         value type specified in iterable type array.                                          
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  280    Function webp_uploads_backup_sources() has parameter $data with no                    
         value type specified in iterable type array.                                          
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  280    Function webp_uploads_backup_sources() return type has no value type                  
         specified in iterable type array.                                                     
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  339    Function webp_uploads_backup_full_image_sources() has no return type                  
         specified.                                                                            
  339    Function webp_uploads_backup_full_image_sources() has parameter                       
         $sources with no value type specified in iterable type array.                         
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  404    Function webp_uploads_restore_image() has parameter $data with no                     
         value type specified in iterable type array.                                          
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  404    Function webp_uploads_restore_image() return type has no value type                   
         specified in iterable type array.                                                     
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
 ------ -------------------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   plugins/webp-uploads/settings.php                                    
 ------ --------------------------------------------------------------------- 
  19     Function webp_uploads_register_media_settings_field() has no return  
         type specified.                                                      
  37     Function webp_uploads_add_media_settings_field() has no return type  
         specified.                                                           
  55     Function webp_uploads_generate_webp_jpeg_setting_callback() has no   
         return type specified.                                               
  76     Function webp_uploads_media_setting_style() has no return type       
         specified.                                                           
 ------ --------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------- 
  Line   plugins/webp-uploads/uninstall.php                               
 ------ ----------------------------------------------------------------- 
  39     Function webp_uploads_delete_plugin_option() has no return type  
         specified.                                                       
 ------ ----------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   tests/includes/admin/load-tests.php                                    
 ------ ----------------------------------------------------------------------- 
  16     Method Admin_Load_Tests::test_perflab_add_features_page() has no       
         return type specified.                                                 
  54     Method Admin_Load_Tests::test_perflab_render_settings_page() has no    
         return type specified.                                                 
  62     Method                                                                 
         Admin_Load_Tests::test_perflab_plugin_action_links_add_settings() has  
         no return type specified.                                              
 ------ ----------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------------- 
  Line   tests/includes/admin/server-timing-tests.php                                                
 ------ -------------------------------------------------------------------------------------------- 
  17     Method                                                                                      
         Admin_Server_Timing_Tests::test_perflab_add_server_timing_page() has                        
         no return type specified.                                                                   
  37     Method                                                                                      
         Admin_Server_Timing_Tests::test_perflab_add_server_timing_page_missing_caps()               
         has no return type specified.                                                               
  53     Method                                                                                      
         Admin_Server_Timing_Tests::test_perflab_load_server_timing_page() has                       
         no return type specified.                                                                   
  81     Method                                                                                      
         Admin_Server_Timing_Tests::test_perflab_render_server_timing_page()                         
         has no return type specified.                                                               
  90     Method                                                                                      
         Admin_Server_Timing_Tests::test_perflab_render_server_timing_page_field()                   
         has no return type specified.                                                               
  102    Method                                                                                      
         Admin_Server_Timing_Tests::test_perflab_render_server_timing_page_field_empty_option()      
         has no return type specified.                                                               
  112    Method                                                                                      
         Admin_Server_Timing_Tests::test_perflab_render_server_timing_page_field_populated_option()  
         has no return type specified.                                                               
 ------ -------------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------- 
  Line   tests/includes/server-timing/load-tests.php                                           
 ------ -------------------------------------------------------------------------------------- 
  13     Method Server_Timing_Load_Tests::test_perflab_server_timing() has no                  
         return type specified.                                                                
  25     Method                                                                                
         Server_Timing_Load_Tests::test_perflab_server_timing_register_metric()                
         has no return type specified.                                                         
  40     Method                                                                                
         Server_Timing_Load_Tests::test_perflab_server_timing_use_output_buffer()              
         has no return type specified.                                                         
  47     Method Server_Timing_Load_Tests::test_perflab_wrap_server_timing()                    
         has no return type specified.                                                         
  70     Method                                                                                
         Server_Timing_Load_Tests::test_perflab_register_server_timing_setting()               
         has no return type specified.                                                         
  108    Method                                                                                
         Server_Timing_Load_Tests::test_perflab_sanitize_server_timing_setting()               
         has no return type specified.                                                         
  108    Method                                                                                
         Server_Timing_Load_Tests::test_perflab_sanitize_server_timing_setting()               
         has parameter $expected with no value type specified in iterable type                 
         array.                                                                                
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  113    Method                                                                                
         Server_Timing_Load_Tests::data_perflab_sanitize_server_timing_setting()               
         has no return type specified.                                                         
 ------ -------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------------------- 
  Line   tests/includes/server-timing/perflab-server-timing-metric-tests.php                               
 ------ -------------------------------------------------------------------------------------------------- 
  13     Property Perflab_Server_Timing_Metric_Tests::$metric has no type                                  
         specified.                                                                                        
  20     Method Perflab_Server_Timing_Metric_Tests::test_get_slug() has no                                 
         return type specified.                                                                            
  24     Method                                                                                            
         Perflab_Server_Timing_Metric_Tests::test_set_value_with_integer() has                             
         no return type specified.                                                                         
  29     Method                                                                                            
         Perflab_Server_Timing_Metric_Tests::test_set_value_with_float() has                               
         no return type specified.                                                                         
  34     Method                                                                                            
         Perflab_Server_Timing_Metric_Tests::test_set_value_with_numeric_string()                          
         has no return type specified.                                                                     
  39     Method                                                                                            
         Perflab_Server_Timing_Metric_Tests::test_set_value_requires_integer_or_float_or_numeric_string()  
         has no return type specified.                                                                     
  46     Method                                                                                            
         Perflab_Server_Timing_Metric_Tests::test_set_value_prevents_late_measurement()                    
         has no return type specified.                                                                     
  56     Method Perflab_Server_Timing_Metric_Tests::test_get_value() has no                                
         return type specified.                                                                            
  61     Method                                                                                            
         Perflab_Server_Timing_Metric_Tests::test_measure_before_and_after_correctly()                     
         has no return type specified.                                                                     
  70     Method                                                                                            
         Perflab_Server_Timing_Metric_Tests::test_measure_after_without_before()                           
         has no return type specified.                                                                     
 ------ -------------------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------------- 
  Line   tests/includes/server-timing/perflab-server-timing-tests.php                                   
 ------ ----------------------------------------------------------------------------------------------- 
  18     Property Perflab_Server_Timing_Tests::$admin_id has no type                                    
         specified.                                                                                     
  19     Property Perflab_Server_Timing_Tests::$dummy_args has no type                                  
         specified.                                                                                     
  21     Method Perflab_Server_Timing_Tests::wpSetUpBeforeClass() has no                                
         return type specified.                                                                         
  30     Method Perflab_Server_Timing_Tests::wpTearDownAfterClass() has no                              
         return type specified.                                                                         
  39     Method                                                                                         
         Perflab_Server_Timing_Tests::test_register_metric_stores_metrics_and_runs_measure_callback()   
         has no return type specified.                                                                  
  55     Method                                                                                         
         Perflab_Server_Timing_Tests::test_register_metric_runs_measure_callback_based_on_access_cap()  
         has no return type specified.                                                                  
  86     Method                                                                                         
         Perflab_Server_Timing_Tests::test_register_metric_prevents_duplicates()                        
         has no return type specified.                                                                  
  95     Method                                                                                         
         Perflab_Server_Timing_Tests::test_register_metric_prevents_late_registration()                 
         has no return type specified.                                                                  
  106    Method                                                                                         
         Perflab_Server_Timing_Tests::test_register_metric_requires_measure_callback()                  
         has no return type specified.                                                                  
  118    Method                                                                                         
         Perflab_Server_Timing_Tests::test_register_metric_requires_access_cap()                        
         has no return type specified.                                                                  
  130    Method Perflab_Server_Timing_Tests::test_has_registered_metric() has                           
         no return type specified.                                                                      
  137    Method                                                                                         
         Perflab_Server_Timing_Tests::test_register_metric_replaces_slashes()                           
         has no return type specified.                                                                  
  153    Method Perflab_Server_Timing_Tests::test_get_header() has no return                            
         type specified.                                                                                
  153    Method Perflab_Server_Timing_Tests::test_get_header() has parameter                            
         $expected with no type specified.                                                              
  153    Method Perflab_Server_Timing_Tests::test_get_header() has parameter                            
         $metrics with no type specified.                                                               
  160    Method Perflab_Server_Timing_Tests::data_get_header() has no return                            
         type specified.                                                                                
  218    Method                                                                                         
         Perflab_Server_Timing_Tests::get_data_to_test_use_output_buffer() has                          
         no return type specified.                                                                      
  268    Method Perflab_Server_Timing_Tests::test_use_output_buffer() has no                            
         return type specified.                                                                         
 ------ ----------------------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------------------------- 
  Line   tests/includes/site-health/audit-autoloaded-options/audit-autoloaded-options-test.php               
 ------ ---------------------------------------------------------------------------------------------------- 
  15     Method                                                                                              
         Audit_Autoloaded_Options_Tests::test_perflab_aao_add_autoloaded_options_test()                      
         has no return type specified.                                                                       
  39     Method                                                                                              
         Audit_Autoloaded_Options_Tests::test_perflab_aao_autoloaded_options_test_no_warning()               
         has no return type specified.                                                                       
  51     Method                                                                                              
         Audit_Autoloaded_Options_Tests::test_perflab_aao_autoloaded_options_test_warning()                  
         has no return type specified.                                                                       
  65     Method                                                                                              
         Audit_Autoloaded_Options_Tests::test_perflab_aao_autoloaded_options_size()                          
         has no return type specified.                                                                       
  88     Method                                                                                              
         Audit_Autoloaded_Options_Tests::test_perflab_aao_autoloaded_options_disable_revert_functionality()  
         has no return type specified.                                                                       
  165    Method Audit_Autoloaded_Options_Tests::set_autoloaded_option() has no                               
         return type specified.                                                                              
  175    Method Audit_Autoloaded_Options_Tests::delete_autoloaded_option() has                               
         no return type specified.                                                                           
 ------ ---------------------------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------------------------- 
  Line   tests/includes/site-health/audit-enqueued-assets/audit-enqueued-assets-helper-test.php              
 ------ ---------------------------------------------------------------------------------------------------- 
  14     Method                                                                                              
         Audit_Enqueued_Assets_Helper_Tests::test_perflab_aea_get_total_enqueued_scripts_no_transient()      
         has no return type specified.                                                                       
  22     Method                                                                                              
         Audit_Enqueued_Assets_Helper_Tests::test_perflab_aea_get_total_enqueued_scripts()                   
         has no return type specified.                                                                       
  35     Method                                                                                              
         Audit_Enqueued_Assets_Helper_Tests::test_perflab_aea_get_total_size_bytes_enqueued_scripts()        
         has no return type specified.                                                                       
  47     Method                                                                                              
         Audit_Enqueued_Assets_Helper_Tests::test_perflab_aea_get_total_enqueued_styles()                    
         has no return type specified.                                                                       
  60     Method                                                                                              
         Audit_Enqueued_Assets_Helper_Tests::test_perflab_aea_get_total_size_bytes_enqueued_styles()         
         has no return type specified.                                                                       
  72     Method                                                                                              
         Audit_Enqueued_Assets_Helper_Tests::test_perflab_aea_get_path_from_resource_url("")                   
         has no return type specified.                                                                       
  81     Method                                                                                              
         Audit_Enqueued_Assets_Helper_Tests::test_perflab_aea_get_path_from_resource_url_subdirectory()      
         has no return type specified.                                                                       
  90     Method                                                                                              
         Audit_Enqueued_Assets_Helper_Tests::test_perflab_aea_get_path_from_resource_url_empty_url("")         
         has no return type specified.                                                                       
  99     Method                                                                                              
         Audit_Enqueued_Assets_Helper_Tests::test_perflab_aea_get_path_from_resource_url_outside_wp_setup()  
         has no return type specified.                                                                       
 ------ ---------------------------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------------------------------- 
  Line   tests/includes/site-health/audit-enqueued-assets/audit-enqueued-assets-test.php                           
 ------ ---------------------------------------------------------------------------------------------------------- 
  17     Method                                                                                                    
         Audit_Enqueued_Assets_Tests::test_perflab_aea_audit_enqueued_scripts_transient_already_set()              
         has no return type specified.                                                                             
  52     Method                                                                                                    
         Audit_Enqueued_Assets_Tests::test_perflab_aea_audit_enqueued_scripts()                                    
         has no return type specified.                                                                             
  86     Method                                                                                                    
         Audit_Enqueued_Assets_Tests::test_perflab_aea_audit_enqueued_styles_transient_already_set()               
         has no return type specified.                                                                             
  126    Method                                                                                                    
         Audit_Enqueued_Assets_Tests::test_perflab_aea_audit_enqueued_styles()                                     
         has no return type specified.                                                                             
  166    Method                                                                                                    
         Audit_Enqueued_Assets_Tests::test_perflab_aea_add_enqueued_assets_test()                                  
         has no return type specified.                                                                             
  191    Method                                                                                                    
         Audit_Enqueued_Assets_Tests::test_perflab_aea_enqueued_js_assets_test_no_transient()                      
         has no return type specified.                                                                             
  198    Method                                                                                                    
         Audit_Enqueued_Assets_Tests::test_perflab_aea_enqueued_js_assets_test_with_assets_less_than_threshold()   
         has no return type specified.                                                                             
  207    Method                                                                                                    
         Audit_Enqueued_Assets_Tests::test_perflab_aea_enqueued_js_assets_test_with_assets_more_than_threshold()   
         has no return type specified.                                                                             
  216    Method                                                                                                    
         Audit_Enqueued_Assets_Tests::test_perflab_aea_enqueued_css_assets_test_no_transient()                     
         has no return type specified.                                                                             
  223    Method                                                                                                    
         Audit_Enqueued_Assets_Tests::test_perflab_aea_enqueued_css_assets_test_with_assets_less_than_threshold()  
         has no return type specified.                                                                             
  232    Method                                                                                                    
         Audit_Enqueued_Assets_Tests::test_aea_enqueued_cdd_assets_test_with_assets_more_than_threshold()          
         has no return type specified.                                                                             
  241    Method                                                                                                    
         Audit_Enqueued_Assets_Tests::test_perflab_aea_invalidate_cache_transients()                               
         has no return type specified.                                                                             
  252    Method                                                                                                    
         Audit_Enqueued_Assets_Tests::test_perflab_aea_clean_aea_audit_action()                                    
         has no return type specified.                                                                             
  282    Method Audit_Enqueued_Assets_Tests::mock_is_front_page() has no                                           
         return type specified.                                                                                    
  290    Method                                                                                                    
         Audit_Enqueued_Assets_Tests::current_user_can_view_site_health_checks_cap()                               
         has no return type specified.                                                                             
  300    Method                                                                                                    
         Audit_Enqueued_Assets_Tests::mock_data_perflab_aea_enqueued_js_assets_test_callback()                     
         return type has no value type specified in iterable type array.                                           
         💡 See:                                                                                                   
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type                      
  312    Method                                                                                                    
         Audit_Enqueued_Assets_Tests::mock_data_perflab_aea_enqueued_css_assets_test_callback()                    
         return type has no value type specified in iterable type array.                                           
         💡 See:                                                                                                   
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type                      
 ------ ---------------------------------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------- 
  Line   tests/load-tests.php                                                              
 ------ ---------------------------------------------------------------------------------- 
  10     Method Load_Tests::test_perflab_get_generator_content() has no return             
         type specified.                                                                   
  16     Method Load_Tests::test_perflab_render_generator() has no return type             
         specified.                                                                        
  28     Method                                                                            
         Load_Tests::test_perflab_maybe_set_object_cache_dropin_no_conflict()              
         has no return type specified.                                                     
  43     Method                                                                            
         Load_Tests::test_perflab_maybe_set_object_cache_dropin_no_conflict_but_failing()  
         has no return type specified.                                                     
  63     Method                                                                            
         Load_Tests::test_perflab_maybe_set_object_cache_dropin_with_conflict()            
         has no return type specified.                                                     
  81     Method                                                                            
         Load_Tests::test_perflab_maybe_set_object_cache_dropin_with_older_version()       
         has no return type specified.                                                     
  108    Method                                                                            
         Load_Tests::test_perflab_maybe_set_object_cache_dropin_with_latest_version()      
         has no return type specified.                                                     
  137    Method                                                                            
         Load_Tests::test_perflab_object_cache_dropin_may_be_disabled_via_filter()         
         has no return type specified.                                                     
  154    Method                                                                            
         Load_Tests::test_perflab_object_cache_dropin_version_matches_latest()             
         has no return type specified.                                                     
  168    Method Load_Tests::set_up_mock_filesystem() has no return type                    
         specified.                                                                        
 ------ ---------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------ 
  Line   tests/plugins/auto-sizes/auto-sizes-test.php                                        
 ------ ------------------------------------------------------------------------------------ 
  21     Method AutoSizesTests::wpSetUpBeforeClass() has no return type                      
         specified.                                                                          
  35     Method AutoSizesTests::test_hooks() has no return type specified.                   
  46     Method AutoSizesTests::test_image_with_lazy_loading_has_auto_sizes()                
         has no return type specified.                                                       
  58     Method                                                                              
         AutoSizesTests::test_image_without_lazy_loading_does_not_have_auto_sizes()          
         has no return type specified.                                                       
  70     Method                                                                              
         AutoSizesTests::test_content_image_with_lazy_loading_has_auto_sizes()               
         has no return type specified.                                                       
  87     Method                                                                              
         AutoSizesTests::test_content_image_without_lazy_loading_does_not_have_auto_sizes()  
         has no return type specified.                                                       
  102    Method AutoSizesTests::test_auto_sizes_render_generator() has no                    
         return type specified.                                                              
 ------ ------------------------------------------------------------------------------------ 

 ------ ----------------------------------------------------------------------------- 
  Line   tests/plugins/dominant-color-images/dominant-color-image-editor-gd-test.php  
 ------ ----------------------------------------------------------------------------- 
  19     Method Dominant_Color_Image_Editor_GD_Test::test_get_dominant_color()        
         has no return type specified.                                                
  19     Method Dominant_Color_Image_Editor_GD_Test::test_get_dominant_color()        
         has parameter $expected_color with no type specified.                        
  19     Method Dominant_Color_Image_Editor_GD_Test::test_get_dominant_color()        
         has parameter $expected_transparency with no type specified.                 
  19     Method Dominant_Color_Image_Editor_GD_Test::test_get_dominant_color()        
         has parameter $image_path with no type specified.                            
  48     Method                                                                       
         Dominant_Color_Image_Editor_GD_Test::test_get_dominant_color_invalid()       
         has no return type specified.                                                
  48     Method                                                                       
         Dominant_Color_Image_Editor_GD_Test::test_get_dominant_color_invalid()       
         has parameter $image_path with no type specified.                            
  69     Method                                                                       
         Dominant_Color_Image_Editor_GD_Test::test_get_dominant_color_none_images()   
         has no return type specified.                                                
  69     Method                                                                       
         Dominant_Color_Image_Editor_GD_Test::test_get_dominant_color_none_images()   
         has parameter $image_path with no type specified.                            
 ------ ----------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------- 
  Line   tests/plugins/dominant-color-images/dominant-color-image-editor-imagick-test.php  
 ------ ---------------------------------------------------------------------------------- 
  21     Method                                                                            
         Dominant_Color_Image_Editor_Imagick_Test::test_get_dominant_color()               
         has no return type specified.                                                     
  21     Method                                                                            
         Dominant_Color_Image_Editor_Imagick_Test::test_get_dominant_color()               
         has parameter $expected_color with no type specified.                             
  21     Method                                                                            
         Dominant_Color_Image_Editor_Imagick_Test::test_get_dominant_color()               
         has parameter $expected_transparency with no type specified.                      
  21     Method                                                                            
         Dominant_Color_Image_Editor_Imagick_Test::test_get_dominant_color()               
         has parameter $image_path with no type specified.                                 
  50     Method                                                                            
         Dominant_Color_Image_Editor_Imagick_Test::test_get_dominant_color_invalid()       
         has no return type specified.                                                     
  50     Method                                                                            
         Dominant_Color_Image_Editor_Imagick_Test::test_get_dominant_color_invalid()       
         has parameter $image_path with no type specified.                                 
  71     Method                                                                            
         Dominant_Color_Image_Editor_Imagick_Test::test_get_dominant_color_none_images()   
         has no return type specified.                                                     
  71     Method                                                                            
         Dominant_Color_Image_Editor_Imagick_Test::test_get_dominant_color_none_images()   
         has parameter $image_path with no type specified.                                 
 ------ ---------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------------------------------- 
  Line   tests/plugins/dominant-color-images/dominant-color-test.php                                                   
 ------ -------------------------------------------------------------------------------------------------------------- 
  18     Method Dominant_Color_Test::test_dominant_color_metadata() has no                                             
         return type specified.                                                                                        
  18     Method Dominant_Color_Test::test_dominant_color_metadata() has                                                
         parameter $expected_color with no type specified.                                                             
  18     Method Dominant_Color_Test::test_dominant_color_metadata() has                                                
         parameter $expected_transparency with no type specified.                                                      
  18     Method Dominant_Color_Test::test_dominant_color_metadata() has                                                
         parameter $image_path with no type specified.                                                                 
  44     Method Dominant_Color_Test::test_dominant_color_get_dominant_color()                                          
         has no return type specified.                                                                                 
  44     Method Dominant_Color_Test::test_dominant_color_get_dominant_color()                                          
         has parameter $expected_color with no type specified.                                                         
  44     Method Dominant_Color_Test::test_dominant_color_get_dominant_color()                                          
         has parameter $expected_transparency with no type specified.                                                  
  44     Method Dominant_Color_Test::test_dominant_color_get_dominant_color()                                          
         has parameter $image_path with no type specified.                                                             
  62     Method Dominant_Color_Test::test_has_transparency_metadata() has no                                           
         return type specified.                                                                                        
  62     Method Dominant_Color_Test::test_has_transparency_metadata() has                                              
         parameter $expected_color with no type specified.                                                             
  62     Method Dominant_Color_Test::test_has_transparency_metadata() has                                              
         parameter $expected_transparency with no type specified.                                                      
  62     Method Dominant_Color_Test::test_has_transparency_metadata() has                                              
         parameter $image_path with no type specified.                                                                 
  86     Method Dominant_Color_Test::test_dominant_color_has_transparency()                                            
         has no return type specified.                                                                                 
  86     Method Dominant_Color_Test::test_dominant_color_has_transparency()                                            
         has parameter $expected_color with no type specified.                                                         
  86     Method Dominant_Color_Test::test_dominant_color_has_transparency()                                            
         has parameter $expected_transparency with no type specified.                                                  
  86     Method Dominant_Color_Test::test_dominant_color_has_transparency()                                            
         has parameter $image_path with no type specified.                                                             
  104    Method Dominant_Color_Test::test_tag_add_adjust_to_image_attributes()                                         
         has no return type specified.                                                                                 
  104    Method Dominant_Color_Test::test_tag_add_adjust_to_image_attributes()                                         
         has parameter $expected_color with no type specified.                                                         
  104    Method Dominant_Color_Test::test_tag_add_adjust_to_image_attributes()                                         
         has parameter $expected_transparency with no type specified.                                                  
  104    Method Dominant_Color_Test::test_tag_add_adjust_to_image_attributes()                                         
         has parameter $image_path with no type specified.                                                             
  146    Method                                                                                                        
         Dominant_Color_Test::test_dominant_color_img_tag_add_dominant_color_requires_proper_quotes()                  
         has no return type specified.                                                                                 
  166    Method                                                                                                        
         Dominant_Color_Test::data_dominant_color_img_tag_add_dominant_color_requires_proper_quotes()                  
         return type has no value type specified in iterable type array.                                               
         💡 See:                                                                                                       
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type                          
  194    Method                                                                                                        
         Dominant_Color_Test::test_dominant_color_img_tag_add_dominant_color_should_add_dominant_color_inline_style()  
         has no return type specified.                                                                                 
  213    Method                                                                                                        
         Dominant_Color_Test::data_provider_dominant_color_check_inline_style()                                        
         return type has no value type specified in iterable type array.                                               
         💡 See:                                                                                                       
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type                          
  234    Method                                                                                                        
         Dominant_Color_Test::test_dominant_color_update_attachment_image_attributes()                                 
         has no return type specified.                                                                                 
  246    Method                                                                                                        
         Dominant_Color_Test::data_provider_dominant_color_filter_check_inline_style()                                 
         return type has no value type specified in iterable type array.                                               
         💡 See:                                                                                                       
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type                          
  270    Method Dominant_Color_Test::test_dominant_color_set_image_editors()                                           
         has no return type specified.                                                                                 
  270    Method Dominant_Color_Test::test_dominant_color_set_image_editors()                                           
         has parameter $existing with no type specified.                                                               
  270    Method Dominant_Color_Test::test_dominant_color_set_image_editors()                                           
         has parameter $expected with no type specified.                                                               
  274    Method                                                                                                        
         Dominant_Color_Test::provider_dominant_color_set_image_editors() has                                          
         no return type specified.                                                                                     
  324    Method Dominant_Color_Test::test_dominant_color_rgb_to_hex() has no                                           
         return type specified.                                                                                        
  324    Method Dominant_Color_Test::test_dominant_color_rgb_to_hex() has                                              
         parameter $blue with no type specified.                                                                       
  324    Method Dominant_Color_Test::test_dominant_color_rgb_to_hex() has                                              
         parameter $green with no type specified.                                                                      
  324    Method Dominant_Color_Test::test_dominant_color_rgb_to_hex() has                                              
         parameter $hex with no type specified.                                                                        
  324    Method Dominant_Color_Test::test_dominant_color_rgb_to_hex() has                                              
         parameter $red with no type specified.                                                                        
  328    Method Dominant_Color_Test::provider_get_hex_color() has no return                                            
         type specified.                                                                                               
  380    Method Dominant_Color_Test::test_dominant_color_render_generator()                                            
         has no return type specified.                                                                                 
 ------ -------------------------------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------- 
  Line   tests/plugins/embed-optimizer/embed-optimizer-test.php                                
 ------ -------------------------------------------------------------------------------------- 
  10     Method Embed_Optimizer_Helper_Tests::test_hooks() has no return type                  
         specified.                                                                            
  21     Method                                                                                
         Embed_Optimizer_Helper_Tests::test_embed_optimizer_filter_oembed_html()               
         has no return type specified.                                                         
  33     Method                                                                                
         Embed_Optimizer_Helper_Tests::get_data_to_test_filter_oembed_html_data()              
         return type has no value type specified in iterable type array.                       
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  143    Method                                                                                
         Embed_Optimizer_Helper_Tests::test_embed_optimizer_lazy_load_scripts()                
         has no return type specified.                                                         
  170    Method                                                                                
         Embed_Optimizer_Helper_Tests::test_embed_optimizer_render_generator()                 
         has no return type specified.                                                         
 ------ -------------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------------------------- 
  Line   tests/plugins/optimization-detective/optimization-tests.php                                         
 ------ ---------------------------------------------------------------------------------------------------- 
  98     Method                                                                                              
         OD_Optimization_Tests::test_od_maybe_add_template_output_buffer_filter_with_query_var_to_disable()  
         has no return type specified.                                                                       
 ------ ---------------------------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------- 
  Line   tests/plugins/speculation-rules/plsr-url-pattern-prefixer-test.php                
 ------ ---------------------------------------------------------------------------------- 
  13     Method PLSR_URL_Pattern_Prefixer_Tests::test_prefix_path_pattern()                
         has no return type specified.                                                     
  13     Method PLSR_URL_Pattern_Prefixer_Tests::test_prefix_path_pattern()                
         has parameter $base_path with no type specified.                                  
  13     Method PLSR_URL_Pattern_Prefixer_Tests::test_prefix_path_pattern()                
         has parameter $expected with no type specified.                                   
  13     Method PLSR_URL_Pattern_Prefixer_Tests::test_prefix_path_pattern()                
         has parameter $path_pattern with no type specified.                               
  22     Method PLSR_URL_Pattern_Prefixer_Tests::data_prefix_path_pattern()                
         has no return type specified.                                                     
  40     Method PLSR_URL_Pattern_Prefixer_Tests::test_get_default_contexts()               
         has no return type specified.                                                     
  52     Method                                                                            
         PLSR_URL_Pattern_Prefixer_Tests::test_get_default_contexts_with_subdirectories()  
         has no return type specified.                                                     
  52     Method                                                                            
         PLSR_URL_Pattern_Prefixer_Tests::test_get_default_contexts_with_subdirectories()  
         has parameter $context with no type specified.                                    
  52     Method                                                                            
         PLSR_URL_Pattern_Prefixer_Tests::test_get_default_contexts_with_subdirectories()  
         has parameter $expected with no type specified.                                   
  52     Method                                                                            
         PLSR_URL_Pattern_Prefixer_Tests::test_get_default_contexts_with_subdirectories()  
         has parameter $unescaped with no type specified.                                  
  66     Method                                                                            
         PLSR_URL_Pattern_Prefixer_Tests::data_default_contexts_with_subdirectories()      
         has no return type specified.                                                     
 ------ ---------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------ 
  Line   tests/plugins/speculation-rules/speculation-rules-helper-test.php                               
 ------ ------------------------------------------------------------------------------------------------ 
  34     Method                                                                                          
         Speculation_Rules_Helper_Tests::test_plsr_get_speculation_rules() has                           
         no return type specified.                                                                       
  50     Method                                                                                          
         Speculation_Rules_Helper_Tests::test_plsr_get_speculation_rules_href_exclude_paths()            
         has no return type specified.                                                                   
  101    Method                                                                                          
         Speculation_Rules_Helper_Tests::test_plsr_get_speculation_rules_href_exclude_paths_with_mode()  
         has no return type specified.                                                                   
  164    Method                                                                                          
         Speculation_Rules_Helper_Tests::test_plsr_get_speculation_rules_with_filtering_bad_keys()       
         has no return type specified.                                                                   
  205    Method                                                                                          
         Speculation_Rules_Helper_Tests::test_plsr_get_speculation_rules_different_home_and_site_urls()  
         has no return type specified.                                                                   
  247    Method                                                                                          
         Speculation_Rules_Helper_Tests::test_plsr_get_speculation_rules_prerender()                     
         has no return type specified.                                                                   
  257    Method                                                                                          
         Speculation_Rules_Helper_Tests::test_plsr_get_speculation_rules_prefetch()                      
         has no return type specified.                                                                   
  270    Method                                                                                          
         Speculation_Rules_Helper_Tests::test_plsr_get_speculation_rules_with_eagerness()                
         has no return type specified.                                                                   
  279    Method                                                                                          
         Speculation_Rules_Helper_Tests::data_plsr_get_speculation_rules_with_eagerness()                
         has no return type specified.                                                                   
 ------ ------------------------------------------------------------------------------------------------ 

 ------ -------------------------------------------------------------------------------------- 
  Line   tests/plugins/speculation-rules/speculation-rules-settings-test.php                   
 ------ -------------------------------------------------------------------------------------- 
  13     Method Speculation_Rules_Settings_Tests::test_plsr_register_setting()                 
         has no return type specified.                                                         
  30     Method Speculation_Rules_Settings_Tests::test_plsr_sanitize_setting()                 
         has no return type specified.                                                         
  30     Method Speculation_Rules_Settings_Tests::test_plsr_sanitize_setting()                 
         has parameter $expected with no value type specified in iterable type                 
         array.                                                                                
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  37     Method Speculation_Rules_Settings_Tests::data_plsr_sanitize_setting()                 
         return type has no value type specified in iterable type array.                       
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  106    Method                                                                                
         Speculation_Rules_Settings_Tests::test_plsr_add_settings_action_link()                
         has no return type specified.                                                         
 ------ -------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------- 
  Line   tests/plugins/speculation-rules/speculation-rules-test.php                            
 ------ -------------------------------------------------------------------------------------- 
  10     Property Speculation_Rules_Tests::$original_wp_theme_features has no                  
         type specified.                                                                       
  22     Method Speculation_Rules_Tests::test_hooks() has no return type                       
         specified.                                                                            
  27     Method                                                                                
         Speculation_Rules_Tests::data_provider_to_test_print_speculation_rules()              
         return type has no value type specified in iterable type array.                       
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  42     Method                                                                                
         Speculation_Rules_Tests::test_plsr_print_speculation_rules_without_html5_support()    
         has no return type specified.                                                         
  70     Method Speculation_Rules_Tests::test_plsr_render_generator_meta_tag()                 
         has no return type specified.                                                         
 ------ -------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   tests/plugins/speculation-rules/speculation-rules-uninstall-tests.php  
 ------ ----------------------------------------------------------------------- 
  26     Method Speculation_Rules_Uninstall_Tests::require_uninstall() has no   
         return type specified.                                                 
  35     Method Speculation_Rules_Uninstall_Tests::test_delete_plugin_option()  
         has no return type specified.                                          
 ------ ----------------------------------------------------------------------- 

 ------ --------------------------------------------------------------- 
  Line   tests/plugins/webp-uploads/data/class-wp-image-edit.php        
 ------ --------------------------------------------------------------- 
  15     Property WP_Image_Edit::$changes has no type specified.        
  16     Property WP_Image_Edit::$target has no type specified.         
  17     Property WP_Image_Edit::$attachment_id has no type specified.  
  18     Property WP_Image_Edit::$result has no type specified.         
 ------ --------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------------------------------------------------------------------- 
  Line   tests/plugins/webp-uploads/helper-tests.php                                                                                            
 ------ --------------------------------------------------------------------------------------------------------------------------------------- 
  19     Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_return_an_error_when_creating_an_additional_image_source_with_invalid_parameters()                
         has no return type specified.                                                                                                          
  19     Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_return_an_error_when_creating_an_additional_image_source_with_invalid_parameters()                
         has parameter $attachment_id with no type specified.                                                                                   
  19     Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_return_an_error_when_creating_an_additional_image_source_with_invalid_parameters()                
         has parameter $destination_file with no type specified.                                                                                
  19     Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_return_an_error_when_creating_an_additional_image_source_with_invalid_parameters()                
         has parameter $mime with no type specified.                                                                                            
  19     Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_return_an_error_when_creating_an_additional_image_source_with_invalid_parameters()                
         has parameter $size_data with no type specified.                                                                                       
  23     Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::data_provider_invalid_arguments_for_webp_uploads_generate_additional_image_source()                         
         has no return type specified.                                                                                                          
  80     Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_create_an_image_with_the_default_suffix_in_the_same_location_when_no_destination_is_specified()   
         has no return type specified.                                                                                                          
  112    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_create_a_file_in_the_specified_location_with_the_specified_name()                                 
         has no return type specified.                                                                                                          
  140    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_prevent_processing_an_image_with_corrupted_metadata()                                             
         has no return type specified.                                                                                                          
  140    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_prevent_processing_an_image_with_corrupted_metadata()                                             
         has parameter $size with no type specified.                                                                                            
  152    Method WebP_Uploads_Helper_Tests::provider_with_modified_metadata()                                                                    
         has no return type specified.                                                                                                          
  184    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_prevent_to_create_an_image_size_when_attached_file_does_not_exists()                              
         has no return type specified.                                                                                                          
  212    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_prevent_to_create_a_subsize_if_the_image_editor_does_not_exists()                                 
         has no return type specified.                                                                                                          
  229    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_prevent_to_upload_a_mime_that_is_not_supported_by_wordpress()                                     
         has no return type specified.                                                                                                          
  243    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_prevent_to_process_an_image_when_the_editor_does_not_support_the_format()                         
         has no return type specified.                                                                                                          
  266    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_create_an_image_with_filter_webp_uploads_pre_generate_additional_image_source()                   
         has no return type specified.                                                                                                          
  300    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_use_filesize_when_filter_webp_uploads_pre_generate_additional_image_source_returns_filesize()     
         has no return type specified.                                                                                                          
  335    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_return_an_error_when_filter_webp_uploads_pre_generate_additional_image_source_returns_wp_error()  
         has no return type specified.                                                                                                          
  363    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_return_empty_array_when_filter_returns_empty_array()                                              
         has no return type specified.                                                                                                          
  377    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_return_default_transforms_when_filter_returns_non_array_type()                                    
         has no return type specified.                                                                                                          
  397    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_return_fallback_transforms_when_overwritten_invalid_transforms()                                  
         has no return type specified.                                                                                                          
  416    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_return_custom_transforms_when_overwritten_by_filter()                                             
         has no return type specified.                                                                                                          
  435    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_return_jpeg_and_webp_transforms_when_option_generate_webp_and_jpeg_set()                          
         has no return type specified.                                                                                                          
  457    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_discard_additional_image_if_larger_than_the_original_image()                                      
         has no return type specified.                                                                                                          
  457    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_discard_additional_image_if_larger_than_the_original_image()                                      
         has parameter $additional_filesize with no type specified.                                                                             
  457    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_discard_additional_image_if_larger_than_the_original_image()                                      
         has parameter $expected_status with no type specified.                                                                                 
  457    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_discard_additional_image_if_larger_than_the_original_image()                                      
         has parameter $original_filesize with no type specified.                                                                               
  464    Method WebP_Uploads_Helper_Tests::data_provider_image_filesize() has                                                                   
         no return type specified.                                                                                                              
  489    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_never_discard_additional_image_if_filter_is_false()                                               
         has no return type specified.                                                                                                          
  489    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_never_discard_additional_image_if_filter_is_false()                                               
         has parameter $additional_filesize with no type specified.                                                                             
  489    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_never_discard_additional_image_if_filter_is_false()                                               
         has parameter $original_filesize with no type specified.                                                                               
  496    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::test_webp_uploads_in_frontend_body_without_wp_query()                                                       
         has no return type specified.                                                                                                          
  502    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::test_webp_uploads_in_frontend_body_with_feed()                                                              
         has no return type specified.                                                                                                          
  509    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::test_webp_uploads_in_frontend_body_without_template_redirect()                                              
         has no return type specified.                                                                                                          
  513    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::test_webp_uploads_in_frontend_body_before_template_redirect()                                               
         has no return type specified.                                                                                                          
  520    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::test_webp_uploads_in_frontend_body_after_template_redirect()                                                
         has no return type specified.                                                                                                          
  527    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::test_webp_uploads_in_frontend_body_within_wp_head()                                                         
         has no return type specified.                                                                                                          
  544    Method WebP_Uploads_Helper_Tests::mock_empty_action() has no return                                                                    
         type specified.                                                                                                                        
  544    Method WebP_Uploads_Helper_Tests::mock_empty_action() has parameter                                                                    
         $action with no type specified.                                                                                                        
  556    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_add_original_image_extension_to_the_webp_file_name_to_ensure_it_is_unique()                       
         has no return type specified.                                                                                                          
  556    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_add_original_image_extension_to_the_webp_file_name_to_ensure_it_is_unique()                       
         has parameter $jpeg_image with no type specified.                                                                                      
  556    Method                                                                                                                                 
         WebP_Uploads_Helper_Tests::it_should_add_original_image_extension_to_the_webp_file_name_to_ensure_it_is_unique()                       
         has parameter $jpg_image with no type specified.                                                                                       
  580    Method WebP_Uploads_Helper_Tests::data_provider_same_image_name() has                                                                  
         no return type specified.                                                                                                              
 ------ --------------------------------------------------------------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------------------------------------------------- 
  Line   tests/plugins/webp-uploads/image-edit-tests.php                                                                             
 ------ ---------------------------------------------------------------------------------------------------------------------------- 
  24     Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_backup_the_sources_structure_alongside_the_full_size()                             
         has no return type specified.                                                                                               
  70     Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_restore_the_sources_array_from_the_backup_when_an_image_is_edited()                
         has no return type specified.                                                                                               
  125    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_prevent_to_back_up_the_sources_when_the_sources_attributes_does_not_exists()       
         has no return type specified.                                                                                               
  154    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_prevent_to_backup_the_full_size_image_if_only_the_thumbnail_is_edited()            
         has no return type specified.                                                                                               
  209    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_backup_the_image_when_all_images_except_the_thumbnail_are_updated()                
         has no return type specified.                                                                                               
  254    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_use_the_attached_image_when_updating_subsequent_images_not_the_original_version()  
         has no return type specified.                                                                                               
  312    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_validate_source_attribute_update_when_webp_edited()                                
         has no return type specified.                                                                                               
  345    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_not_return_a_target_if_no_backup_image_exists()                                    
         has no return type specified.                                                                                               
  355    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_return_the_full_orig_target_key_when_only_one_edit_image_exists()                  
         has no return type specified.                                                                                               
  372    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_return_null_when_looking_for_a_target_that_is_already_used()                       
         has no return type specified.                                                                                               
  386    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_use_the_next_available_hash_for_the_full_size_image_on_multiple_image_edits()      
         has no return type specified.                                                                                               
  408    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_save_populate_the_backup_sources_with_the_next_target()                            
         has no return type specified.                                                                                               
  428    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_store_the_metadata_on_the_next_available_hash()                                    
         has no return type specified.                                                                                               
  460    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_prevent_to_store_an_empty_set_of_sources()                                         
         has no return type specified.                                                                                               
  479    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_store_the_next_image_hash_on_the_backup_sources()                                  
         has no return type specified.                                                                                               
  507    Method                                                                                                                      
         WebP_Uploads_Image_Edit_Tests::it_should_create_backup_of_full_size_images_with_the_same_hash_keys_as_the_edited_images()   
         has no return type specified.                                                                                               
 ------ ---------------------------------------------------------------------------------------------------------------------------- 

 ------ ---------------------------------------------------------------------------------------------------------------------------------- 
  Line   tests/plugins/webp-uploads/load-tests.php                                                                                         
 ------ ---------------------------------------------------------------------------------------------------------------------------------- 
  17     Property WebP_Uploads_Load_Tests::$to_unlink type has no value type                                                               
         specified in iterable type array.                                                                                                 
         💡 See:                                                                                                                           
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type                                              
  45     Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_not_create_the_original_mime_type_for_jpeg_images()                                            
         has no return type specified.                                                                                                     
  77     Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_create_the_original_mime_type_as_well_with_all_the_available_sources_for_the_specified_mime()  
         has no return type specified.                                                                                                     
  106    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_create_jpeg_and_webp_for_jpeg_images_if_opted_in()                                             
         has no return type specified.                                                                                                     
  137    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_create_jpeg_and_webp_for_jpeg_images_if_generate_webp_and_jpeg_set()                           
         has no return type specified.                                                                                                     
  168    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_not_create_the_sources_property_if_no_transform_is_provided()                                  
         has no return type specified.                                                                                                     
  189    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_create_the_sources_property_when_no_transform_is_available()                                   
         has no return type specified.                                                                                                     
  216    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_not_create_the_sources_property_if_the_mime_is_not_specified_on_the_transforms_images()        
         has no return type specified.                                                                                                     
  242    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_create_a_webp_version_with_all_the_required_properties()                                       
         has no return type specified.                                                                                                     
  270    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_create_the_full_size_images_when_no_size_is_available()                                        
         has no return type specified.                                                                                                     
  288    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_remove_scaled_suffix_from_the_generated_filename()                                             
         has no return type specified.                                                                                                     
  315    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_remove_the_generated_webp_images_when_the_attachment_is_deleted()                              
         has no return type specified.                                                                                                     
  350    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_remove_the_attached_webp_version_if_the_attachment_is_force_deleted()                          
         has no return type specified.                                                                                                     
  377    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_remove_full_size_images_when_no_size_image_exists()                                            
         has no return type specified.                                                                                                     
  402    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_remove_the_backup_sizes_and_sources_if_the_attachment_is_deleted_after_edit()                  
         has no return type specified.                                                                                                     
  437    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_avoid_the_change_of_urls_of_images_that_are_not_part_of_the_media_library()                    
         has no return type specified.                                                                                                     
  453    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_avoid_replacing_not_existing_attachment_i_ds()                                                 
         has no return type specified.                                                                                                     
  469    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_prevent_replacing_a_webp_image()                                                               
         has no return type specified.                                                                                                     
  496    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_prevent_replacing_a_jpg_image_if_the_image_does_not_have_the_target_class_name()               
         has no return type specified.                                                                                                     
  517    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_replace_references_to_a_jpg_image_to_a_webp_version()                                          
         has no return type specified.                                                                                                     
  517    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_replace_references_to_a_jpg_image_to_a_webp_version()                                          
         has parameter $image_path with no type specified.                                                                                 
  545    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_not_replace_the_references_to_a_jpg_image_when_disabled_via_filter()                           
         has no return type specified.                                                                                                     
  545    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_not_replace_the_references_to_a_jpg_image_when_disabled_via_filter()                           
         has parameter $image_path with no type specified.                                                                                 
  562    Method                                                                                                                            
         WebP_Uploads_Load_Tests::provider_replace_images_with_different_extensions()                                                      
         has no return type specified.                                                                                                     
  572    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_replace_all_the_images_including_the_full_size_image()                                         
         has no return type specified.                                                                                                     
  599    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_prevent_replacing_an_image_with_no_available_sources()                                         
         has no return type specified.                                                                                                     
  616    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_prevent_update_not_supported_images_with_no_available_sources()                                
         has no return type specified.                                                                                                     
  616    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_prevent_update_not_supported_images_with_no_available_sources()                                
         has parameter $image_path with no type specified.                                                                                 
  625    Method                                                                                                                            
         WebP_Uploads_Load_Tests::data_provider_not_supported_webp_images()                                                                
         has no return type specified.                                                                                                     
  635    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_use_the_original_image_to_generate_all_the_image_sizes()                                       
         has no return type specified.                                                                                                     
  668    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_preserve_jpeg_subsizes_using_transform_filter()                                                
         has no return type specified.                                                                                                     
  689    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_allow_the_upload_of_a_webp_image_if_at_least_one_editor_supports_the_format()                  
         has no return type specified.                                                                                                     
  719    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_replace_the_featured_image_to_webp_when_requesting_the_featured_image()                        
         has no return type specified.                                                                                                     
  735    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_prevent_replacing_an_image_uploaded_via_external_source()                                      
         has no return type specified.                                                                                                     
  756    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_create_webp_when_webp_is_smaller_than_jpegs()                                                  
         has no return type specified.                                                                                                     
  795    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_create_webp_for_full_size_which_is_smaller_in_webp_format()                                    
         has no return type specified.                                                                                                     
  822    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_create_webp_for_some_sizes_which_are_smaller_in_webp_format()                                  
         has no return type specified.                                                                                                     
  855    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_add_fallback_script_if_content_has_updated_images()                                            
         has no return type specified.                                                                                                     
  887    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_not_add_fallback_script_if_content_has_no_updated_images()                                     
         has no return type specified.                                                                                                     
  903    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_create_mime_types_for_allowed_sizes_only_via_filter()                                          
         has no return type specified.                                                                                                     
  929    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_create_mime_types_for_allowed_sizes_only_via_global_variable()                                 
         has no return type specified.                                                                                                     
  950    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_set_quality_with_image_conversion()                                                            
         has no return type specified.                                                                                                     
  980    Method                                                                                                                            
         WebP_Uploads_Load_Tests::it_should_return_correct_quality_for_mime_types()                                                        
         has no return type specified.                                                                                                     
  992    Method WebP_Uploads_Load_Tests::test_webp_uploads_render_generator()                                                              
         has no return type specified.                                                                                                     
  1002   Method WebP_Uploads_Load_Tests::mock_frontend_body_hooks() has no                                                                 
         return type specified.                                                                                                            
  1010   Method WebP_Uploads_Load_Tests::force_webp_image_quality_86() has no                                                              
         return type specified.                                                                                                            
  1010   Method WebP_Uploads_Load_Tests::force_webp_image_quality_86() has                                                                 
         parameter $mime_type with no type specified.                                                                                      
  1010   Method WebP_Uploads_Load_Tests::force_webp_image_quality_86() has                                                                 
         parameter $quality with no type specified.                                                                                        
 ------ ---------------------------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------- 
  Line   tests/plugins/webp-uploads/rest-api-tests.php                                  
 ------ ------------------------------------------------------------------------------- 
  21     Method                                                                         
         WebP_Uploads_REST_API_Tests::it_should_add_sources_to_rest_response()          
         has no return type specified.                                                  
  78     Method                                                                         
         WebP_Uploads_REST_API_Tests::it_should_check_media_details_in_rest_response()  
         has no return type specified.                                                  
 ------ ------------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------- 
  Line   tests/plugins/webp-uploads/settings-tests.php                              
 ------ --------------------------------------------------------------------------- 
  13     Method                                                                     
         WebP_Uploads_Settings_Tests::test_webp_uploads_add_settings_action_link()  
         has no return type specified.                                              
 ------ --------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------ 
  Line   tests/testdata/modules/site-health/audit-enqueued-assets/class-audit-assets-transients-set.php  
 ------ ------------------------------------------------------------------------------------------------ 
  22     Method Audit_Assets_Transients_Set::set_script_transient_with_data()                            
         has no return type specified.                                                                   
  37     Method                                                                                          
         Audit_Assets_Transients_Set::set_script_transient_with_no_data() has                            
         no return type specified.                                                                       
  46     Method Audit_Assets_Transients_Set::set_style_transient_with_data()                             
         has no return type specified.                                                                   
  61     Method                                                                                          
         Audit_Assets_Transients_Set::set_style_transient_with_no_data() has                             
         no return type specified.                                                                       
 ------ ------------------------------------------------------------------------------------------------ 

 ------ ------------------------------------------------------------------------------------------------ 
  Line   tests/testdata/modules/site-health/audit-enqueued-assets/class-site-health-mock-responses.php   
 ------ ------------------------------------------------------------------------------------------------ 
  19     Method                                                                                          
         Site_Health_Mock_Responses::return_added_test_info_site_health()                                
         return type has no value type specified in iterable type array.                                 
         💡 See:                                                                                         
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type            
  39     Method                                                                                          
         Site_Health_Mock_Responses::return_aea_enqueued_js_assets_test_callback_less_than_threshold()   
         return type has no value type specified in iterable type array.                                 
         💡 See:                                                                                         
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type            
  76     Method                                                                                          
         Site_Health_Mock_Responses::return_aea_enqueued_js_assets_test_callback_more_than_threshold()   
         return type has no value type specified in iterable type array.                                 
         💡 See:                                                                                         
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type            
  113    Method                                                                                          
         Site_Health_Mock_Responses::return_aea_enqueued_css_assets_test_callback_less_than_threshold()  
         return type has no value type specified in iterable type array.                                 
         💡 See:                                                                                         
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type            
  150    Method                                                                                          
         Site_Health_Mock_Responses::return_aea_enqueued_css_assets_test_callback_more_than_threshold()  
         return type has no value type specified in iterable type array.                                 
         💡 See:                                                                                         
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type            
 ------ ------------------------------------------------------------------------------------------------ 

 ------ -------------------------------------------------------------------------------------- 
  Line   tests/utils/Constraint/ImageHasSource.php                                             
 ------ -------------------------------------------------------------------------------------- 
  39     Method PerformanceLab\Tests\Constraint\ImageHasSource::isNot() has no                 
         return type specified.                                                                
  87     Method                                                                                
         PerformanceLab\Tests\Constraint\ImageHasSource::verify_sources() has                  
         parameter $sources with no value type specified in iterable type                      
         array.                                                                                
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
 ------ -------------------------------------------------------------------------------------- 

 ------ -------------------------------------------------------------------------------------- 
  Line   tests/utils/Filesystem/WP_Filesystem_MockFilesystem.php                               
 ------ -------------------------------------------------------------------------------------- 
  16     Property WP_Filesystem_MockFilesystem::$file_contents has no type                     
         specified.                                                                            
  25     Method WP_Filesystem_MockFilesystem::get_contents_array() return type                 
         has no value type specified in iterable type array.                                   
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
  136    Method WP_Filesystem_MockFilesystem::dirlist() return type has no                     
         value type specified in iterable type array.                                          
         💡 See:                                                                               
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type  
 ------ -------------------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------------------------------- 
  Line   tests/utils/TestCase/DominantColorTestCase.php                                                     
 ------ --------------------------------------------------------------------------------------------------- 
  13     Method                                                                                             
         PerformanceLab\Tests\TestCase\DominantColorTestCase::provider_get_dominant_color()                 
         return type has no value type specified in iterable type array.                                    
         💡 See:                                                                                            
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type               
  111    Method                                                                                             
         PerformanceLab\Tests\TestCase\DominantColorTestCase::provider_get_dominant_color_invalid_images()  
         return type has no value type specified in iterable type array.                                    
         💡 See:                                                                                            
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type               
  127    Method                                                                                             
         PerformanceLab\Tests\TestCase\DominantColorTestCase::provider_get_dominant_color_none_images()     
         return type has no value type specified in iterable type array.                                    
         💡 See:                                                                                            
            https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type               
 ------ --------------------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------- 
  Line   tests/utils/TestCase/ImagesTestCase.php                                      
 ------ ----------------------------------------------------------------------------- 
  31     Method                                                                       
         PerformanceLab\Tests\TestCase\ImagesTestCase::assertImageHasSource()         
         has no return type specified.                                                
  45     Method                                                                       
         PerformanceLab\Tests\TestCase\ImagesTestCase::assertImageNotHasSource()      
         has no return type specified.                                                
  61     Method                                                                       
         PerformanceLab\Tests\TestCase\ImagesTestCase::assertImageHasSizeSource()     
         has no return type specified.                                                
  76     Method                                                                       
         PerformanceLab\Tests\TestCase\ImagesTestCase::assertImageNotHasSizeSource()  
         has no return type specified.                                                
  88     Method                                                                       
         PerformanceLab\Tests\TestCase\ImagesTestCase::assertFileNameIsEdited()       
         has no return type specified.                                                
  98     Method                                                                       
         PerformanceLab\Tests\TestCase\ImagesTestCase::assertFileNameIsNotEdited()    
         has no return type specified.                                                
  109    Method                                                                       
         PerformanceLab\Tests\TestCase\ImagesTestCase::assertSizeNameIsHashed()       
         has no return type specified.                                                
  116    Method                                                                       
         PerformanceLab\Tests\TestCase\ImagesTestCase::opt_in_to_jpeg_and_webp()      
         has no return type specified.                                                
 ------ ----------------------------------------------------------------------------- 

 [ERROR] Found 381 errors                                                       


Please review individual commits for changes.

@westonruter westonruter added the [Type] Bug An existing feature is broken label May 6, 2024
@westonruter westonruter added this to the performance-lab 3.1.0 milestone May 6, 2024
@westonruter westonruter changed the title Bump PHPStan level to 6 Update PHPStan level to 6 May 6, 2024
@westonruter westonruter force-pushed the update/phpstan-level-6 branch from fc342b2 to 2d56764 Compare May 7, 2024 05:34
@westonruter westonruter marked this pull request as ready for review May 7, 2024 05:41
@@ -118,7 +118,7 @@ public static function get_post( string $slug ): ?WP_Post {
*/
public static function get_url_metrics_from_post( WP_Post $post ): array {
$this_function = __FUNCTION__;
$trigger_warning = static function ( $message ) use ( $this_function ) {
$trigger_warning = static function ( $message ) use ( $this_function ): void {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized that a "trigger warning" is a noun too 😊

@@ -239,12 +239,13 @@ function webp_uploads_generate_image_size( $attachment_id, $size, $mime ) {
* Returns the attachment sources array ordered by filesize.
*
* @since 1.0.0
* @todo This function is not used anywhere.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should check for when this function was first introduced and when it became no longer used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems its use was removed in 94f359e as part of #302, but the webp_uploads_get_attachment_sources() function wasn't removed as well. I guess we'll throw in a @deprecated and _deprecated_function().

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to maintain a separate file for deprecated functions?

Copy link
Member Author

@westonruter westonruter May 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sure... done in 13dd295 and 511b670

'file' => 'leaves.webp',
'filesize' => 1234,
),
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicit typing uncovered the wrong data was being tested.

@westonruter westonruter requested a review from thelovekesh May 7, 2024 06:24
Base automatically changed from update/phpstan-level-5 to trunk May 7, 2024 16:43
Comment on lines +48 to +62
"format:all": [
"@format",
"@format:auto-sizes",
"@format:dominant-color-images",
"@format:embed-optimizer",
"@format:optimization-detective",
"@format:speculation-rules",
"@format:webp-uploads"
],
"format:auto-sizes": "@format -- ./plugins/auto-sizes --standard=./plugins/auto-sizes/phpcs.xml.dist",
"format:dominant-color-images": "@format -- ./plugins/dominant-color-images --standard=./plugins/dominant-color-images/phpcs.xml.dist",
"format:embed-optimizer": "@format -- ./plugins/embed-optimizer --standard=./plugins/embed-optimizer/phpcs.xml.dist",
"format:optimization-detective": "@format -- ./plugins/optimization-detective --standard=./plugins/optimization-detective/phpcs.xml.dist",
"format:speculation-rules": "@format -- ./plugins/speculation-rules --standard=./plugins/speculation-rules/phpcs.xml.dist",
"format:webp-uploads": "@format -- ./plugins/webp-uploads --standard=./plugins/webp-uploads/phpcs.xml.dist",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thelovekesh AFAIK this will be obsolete with what you've got pending in another PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes @westonruter but that's still under consideration.

… update/phpstan-level-6

* 'trunk' of https://github.com/WordPress/performance:
  Add test case for when RGB values are too high
  Ensure RGB variable is int
  fix: avoid needless array allocation in rgb to hex conversion
@@ -42,11 +42,14 @@ public function toString(): string {
/**
* Evaluates the constraint for the provided attachment ID.
*
* @param int $attachment_id Attachment ID.
* @param mixed $other Attachment ID.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure I understand why this is mixed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, it's in order to be compatible with the class that this class extends (\PHPUnit\Framework\Constraint\Constraint) which is:

   /**
     * Evaluates the constraint for parameter $other. Returns true if the
     * constraint is met, false otherwise.
     *
     * This method can be overridden to implement the evaluation algorithm.
     *
     * @param mixed $other value or object to evaluate
     *
     * @codeCoverageIgnore
     */
    protected function matches($other): bool
    {
        return false;
    }

adamsilverstein

This comment was marked as duplicate.

Copy link
Member

@adamsilverstein adamsilverstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tremendous!

@@ -15,10 +15,14 @@
*
* @since 1.0.0
*
* @param array $attr Attributes for the image markup.
* @return array The filtered attributes for the image markup.
* @param array<string, string>|mixed $attr Attributes for the image markup.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is always expected to be an array. Would it be better to add strong typing to the param, or are you trying to avoid doing so because it is filtered content? I have similar questions about several other places where similar changes are being applied.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because it is filtered another plugin would put anything here. So it seems safer to use mixed and then do runtime type checking to avoid a fatal error.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you want a _doing_it_wrong() to be added in cases like this so that the error isn't silently suppressed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the strategy is to treat all input from filters as $mixed then I think this is fine for consistency. Making sure that we're doing early type validation—as you're doing—seems like enough to me.

Comment on lines -19 to +25
public function it_should_return_an_error_when_creating_an_additional_image_source_with_invalid_parameters( $attachment_id, $size_data, $mime, $destination_file = null ) {
$this->assertInstanceOf( WP_Error::class, webp_uploads_generate_additional_image_source( $attachment_id, $size_data, $mime, $destination_file ) );
public function it_should_return_an_error_when_creating_an_additional_image_source_with_invalid_parameters( int $attachment_id, string $image_size, array $size_data, string $mime ): void {
$this->assertInstanceOf( WP_Error::class, webp_uploads_generate_additional_image_source( $attachment_id, $image_size, $size_data, $mime ) );
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The arguments being passed were wrong here.

@westonruter westonruter force-pushed the update/phpstan-level-6 branch from 34bd0c7 to 6768c98 Compare May 8, 2024 21:36
@westonruter westonruter merged commit 8b742ee into trunk May 9, 2024
@westonruter westonruter deleted the update/phpstan-level-6 branch May 9, 2024 17:07
@westonruter westonruter added the skip changelog PRs that should not be mentioned in changelogs label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changelog PRs that should not be mentioned in changelogs [Type] Bug An existing feature is broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants