Make WordPress Core


Ignore:
Timestamp:
06/27/2015 01:02:12 AM (10 years ago)
Author:
wonderboymusic
Message:

For doc block types, favor bool over the few remaining booleans

See #32444.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-image-editor.php

    r32800 r32964  
    3838     *
    3939     * @param array $args
    40      * @return boolean
     40     * @return bool
    4141     */
    4242    public static function test( $args = array() ) {
     
    5555     *
    5656     * @param string $mime_type
    57      * @return boolean
     57     * @return bool
    5858     */
    5959    public static function supports_mime_type( $mime_type ) {
     
    6868     * @abstract
    6969     *
    70      * @return boolean|WP_Error True if loaded; WP_Error on failure.
     70     * @return bool|WP_Error True if loaded; WP_Error on failure.
    7171     */
    7272    abstract public function load();
     
    9898     * @param  int|null $max_w Image width.
    9999     * @param  int|null $max_h Image height.
    100      * @param  boolean  $crop
    101      * @return boolean|WP_Error
     100     * @param  bool     $crop
     101     * @return bool|WP_Error
    102102     */
    103103    abstract public function resize( $max_w, $max_h, $crop = false );
     
    136136     * @param int $dst_w Optional. The destination width.
    137137     * @param int $dst_h Optional. The destination height.
    138      * @param boolean $src_abs Optional. If the source crop points are absolute.
    139      * @return boolean|WP_Error
     138     * @param bool $src_abs Optional. If the source crop points are absolute.
     139     * @return bool|WP_Error
    140140     */
    141141    abstract public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false );
     
    149149     *
    150150     * @param float $angle
    151      * @return boolean|WP_Error
     151     * @return bool|WP_Error
    152152     */
    153153    abstract public function rotate( $angle );
     
    160160     * @abstract
    161161     *
    162      * @param boolean $horz Flip along Horizontal Axis
    163      * @param boolean $vert Flip along Vertical Axis
    164      * @return boolean|WP_Error
     162     * @param bool $horz Flip along Horizontal Axis
     163     * @param bool $vert Flip along Vertical Axis
     164     * @return bool|WP_Error
    165165     */
    166166    abstract public function flip( $horz, $vert );
     
    174174     *
    175175     * @param string $mime_type
    176      * @return boolean|WP_Error
     176     * @return bool|WP_Error
    177177     */
    178178    abstract public function stream( $mime_type = null );
     
    411411     * @param callable $function
    412412     * @param array $arguments
    413      * @return boolean
     413     * @return bool
    414414     */
    415415    protected function make_image( $filename, $function, $arguments ) {
Note: See TracChangeset for help on using the changeset viewer.