WordPress.org

Make WordPress Core

Opened 4 weeks ago

Last modified 4 weeks ago

#44422 new defect (bug)

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

Reported by: subrataemfluence Owned by:
Milestone: 5.0 Priority: normal
Severity: normal Version: trunk
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 4 weeks ago.
Proposed patch
44422-2.diff (744 bytes) - added by subrataemfluence 4 weeks ago.
Updated patch with extra spaces removed.

Download all attachments as: .zip

Change History (5)

@subrataemfluence
4 weeks ago

Proposed patch

#1 follow-up: @netweb
4 weeks 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
4 weeks ago

Updated patch with extra spaces removed.

#2 in reply to: ↑ 1 @subrataemfluence
4 weeks 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
4 weeks ago

  • Keywords commit added; needs-refresh removed

Looks good, thanks @subrataemfluence

Note: See TracTickets for help on using tickets.