Docs: Replace multiple single line comments with multi-line comments.

This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#5-inline-comments.

Follow-up to [56174], [56175], [56176], [56177].

Props costdev, audrasjb.
See #58459.




git-svn-id: https://develop.svn.wordpress.org/trunk@56178 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras
2023-07-09 21:23:34 +00:00
parent 3b68269941
commit bf911a96a8
8 changed files with 73 additions and 38 deletions

View File

@@ -285,8 +285,10 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
if ( preg_match_all( '!(<ins>.*?</ins>|<del>.*?</del>)!', $diff, $diff_matches ) ) {
// Length of all text between <ins> or <del>.
$stripped_matches = strlen( strip_tags( implode( ' ', $diff_matches[0] ) ) );
// Since we count length of text between <ins> or <del> (instead of picking just one),
// we double the length of chars not in those tags.
/*
* Since we count length of text between <ins> or <del> (instead of picking just one),
* we double the length of chars not in those tags.
*/
$stripped_diff = strlen( strip_tags( $diff ) ) * 2 - $stripped_matches;
$diff_ratio = $stripped_matches / $stripped_diff;
if ( $diff_ratio > $this->_diff_threshold ) {
@@ -416,8 +418,10 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
$orig_rows_copy = $orig_rows;
$final_rows = array_keys( $final_matches );
// Interleaves rows with blanks to keep matches aligned.
// We may end up with some extraneous blank rows, but we'll just ignore them later.
/*
* Interleaves rows with blanks to keep matches aligned.
* We may end up with some extraneous blank rows, but we'll just ignore them later.
*/
foreach ( $orig_rows_copy as $orig_row ) {
$final_pos = array_search( $orig_matches[ $orig_row ], $final_rows, true );
$orig_pos = (int) array_search( $orig_row, $orig_rows, true );