[wp-trac] [WordPress Trac] #58271: Docs: WP_Image_Editor classes have incorrect type for $crop in docblocks

WordPress Trac noreply at wordpress.org
Mon May 8 21:32:01 UTC 2023


#58271: Docs: WP_Image_Editor classes have incorrect type for $crop in docblocks
--------------------------+-----------------------------
 Reporter:  thunderdw     |      Owner:  thunderdw
     Type:  defect (bug)  |     Status:  assigned
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  trunk
 Severity:  trivial       |   Keywords:
  Focuses:  docs          |
--------------------------+-----------------------------
 The docblocks for the `WP_Image_Editor` `resize()` and `multi_resize()`
 functions indicate that `$crop` is of type `bool`, instead of
 `bool|array`. The implementations of these functions by
 `WP_Image_Editor_Imagick` and `WP_Image_Editor_GD` also have these
 docblock errors, and they additionally both have the error in the docblock
 for their `make_subsize()` functions.

 The `$crop` docblock type should match the type documented in
 `image_resize_dimensions()`.

 Affected files:
 - `wp-includes/class-wp-image-editor-gd.php`
 - `wp-includes/class-wp-image-editor-imagick.php`
 - `wp-includes/class-wp-image-editor.php`

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58271>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list