MNT Fix linting issue

This commit is contained in:
Guy Sartorelli 2023-02-02 13:10:24 +13:00
parent 603723e8f3
commit 557421a245
No known key found for this signature in database
GPG Key ID: F313E3B9504D496A
2 changed files with 25 additions and 26 deletions

View File

@ -170,8 +170,7 @@ class HtmlDiff
string $oldOrNew, string $oldOrNew,
bool $lookForTag, bool $lookForTag,
string $value string $value
): void ): void {
{
$alreadyMidBlock = $openTagsInBlock[$oldOrNew] > 0; $alreadyMidBlock = $openTagsInBlock[$oldOrNew] > 0;
$canAddTagsToBlock = $lookForTag || $alreadyMidBlock; $canAddTagsToBlock = $lookForTag || $alreadyMidBlock;

View File

@ -131,32 +131,32 @@ class HtmlDiffTest extends SapphireTest
} }
$from = '<table> $from = '<table>
<tbody> <tbody>
<tr class="blah"> <tr class="blah">
<td colspan="2">Row 1</td> <td colspan="2">Row 1</td>
</tr> </tr>
<tr class="foo"> <tr class="foo">
<td>Row 2</td> <td>Row 2</td>
<td>Row 2</td> <td>Row 2</td>
</tr> </tr>
<tr> <tr>
<td>Row 3</td> <td>Row 3</td>
<td>Row 3</td> <td>Row 3</td>
</tr> </tr>
</tbody> </tbody>
</table>'; </table>';
$to = '<table class="new-class"> $to = '<table class="new-class">
<tbody> <tbody>
<tr class="blah"> <tr class="blah">
<td colspan="2">Row 1</td> <td colspan="2">Row 1</td>
</tr> </tr>
<tr class="foo"> <tr class="foo">
<td>Row 2</td> <td>Row 2</td>
<td>Row 2</td> <td>Row 2</td>
</tr> </tr>
</tbody> </tbody>
</table>'; </table>';
$expected = '<del>' . $from . '</del>' . '<ins>' . $to . '</ins>'; $expected = '<del>' . $from . '</del>' . '<ins>' . $to . '</ins>';
$compare = HtmlDiff::compareHtml($from, $to); $compare = HtmlDiff::compareHtml($from, $to);