Any function parameter which is documented as being of type array should have an array type hint.

CommentFileSizeAuthor
#6 webform-array_hint-2915789-6.patch1.64 KBdanchadwick

Comments

Liam Morland created an issue. See original summary.

  • Liam Morland committed f498529 on 7.x-4.x
    Issue #2915789 by Liam Morland: Add "array" type hints
    
liam morland’s picture

Status: Active » Fixed

  • DanChadwick committed 45004e2 on 7.x-4.x
    Issue #2915789-2 by DanChadwick: Match superclass signature in...
danchadwick’s picture

Category: Task » Bug report
Status: Fixed » Needs work

This creates a regression because of the requirement for signatures to match in object inheritance hierarchies. There might be other issues, but the one I'm getting is:
Warning: Declaration of webform_exporter_excel_xlsx::add_row(&$file_handle, $data, $row_count) should be compatible with webform_exporter::add_row(&$file_handle, array $data, $row_count) in include_once() (line 6 of /var/www/drupal7/sites/all/modules/contrib/webform/includes/exporters/webform_exporter_excel_xlsx.inc).

danchadwick’s picture

Status: Needs work » Fixed
StatusFileSize
new1.64 KB

Committed to 7.x-4.x

danchadwick’s picture

@Liam Morland: Each maintainer needs to arrive at a maintenance philosophy that he/she is comfortable with. I tended to *not* make code changes for "clean up" purposes without significant community review. There isn't much upside and there is some downside, as this issue demonstrates. The choice is yours to make, of course. I'm just back-seat driving. :) Many thanks for all your work on webform.

  • Liam Morland committed 8cf65f6 on 7.x-4.x
    Issue #2915789 by Liam Morland: Match superclass signature in subclasses...
liam morland’s picture

Thanks, Dan.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.