Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#44422 closed defect (bug) (fixed)

Missing @return tag and wrong parameter reference in function/method PHPDoc comment

Reported by: subrataemfluence's profile subrataemfluence Owned by: drewapicture's profile DrewAPicture
Milestone: 5.1 Priority: normal
Severity: normal Version: 5.1
Component: Filesystem API Keywords: has-patch commit
Focuses: docs, coding-standards Cc:

Description

File name: src/wp-includes/pomo/streams.php

Wrong parameter name reference

<?php
/**
* ...
* @param integer count How many elements should be read
* ...
*/
function readint32array( $count ) {
 ...
}

Missing @return tag.

<?php
/**
* @param int $bytes
*/
function read( $bytes ) {
   return fread( $this->_f, $bytes );
}

Attachments (2)

44422.diff (746 bytes) - added by subrataemfluence 6 years ago.
Proposed patch
44422-2.diff (744 bytes) - added by subrataemfluence 6 years ago.
Updated patch with extra spaces removed.

Download all attachments as: .zip

Change History (7)

@subrataemfluence
6 years ago

Proposed patch

#1 follow-up: @netweb
6 years ago

  • Keywords has-patch needs-refresh added; needs-patch removed
  • Milestone changed from Awaiting Review to 5.0

Can you remove the spacing between the types please @subrataemfluence i.e. string|false

@subrataemfluence
6 years ago

Updated patch with extra spaces removed.

#2 in reply to: ↑ 1 @subrataemfluence
6 years ago

I have uploaded modified patch. Please let me know if this looks OK.

Replying to netweb:

Can you remove the spacing between the types please @subrataemfluence i.e. string|false

#3 @netweb
6 years ago

  • Keywords commit added; needs-refresh removed

Looks good, thanks @subrataemfluence

#4 @pento
6 years ago

  • Milestone changed from 5.0 to 5.1

#5 @DrewAPicture
6 years ago

  • Owner set to DrewAPicture
  • Resolution set to fixed
  • Status changed from new to closed

In 44326:

Docs: Fix the syntax for a parameter notation and separately add a missing return notation for two POMO_Reader methods.

Props subrataemfluence.
Fixes #44422.

Note: See TracTickets for help on using tickets.