<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment" />
<exclude name="MediaWiki.Usage.DbrQueryUsage.DbrQueryFound" />
<exclude name="MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage" />
- <exclude name="MediaWiki.Usage.ForbiddenFunctions.assert" />
<exclude name="MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
*/
use MediaWiki\Diff\ComplexityException;
+// FIXME: Don't use assert() in this file
+// phpcs:disable MediaWiki.Usage.ForbiddenFunctions.assert
+
/**
* This diff implementation is mainly lifted from the LCS algorithm of the Eclipse project which
* in turn is based on Myers' "An O(ND) difference algorithm and its variations"
$this->flushLine( $tag );
$word = substr( $word, 1 );
}
+ // FIXME: Don't use assert()
+ // phpcs:ignore MediaWiki.Usage.ForbiddenFunctions.assert
assert( !strstr( $word, "\n" ) );
$this->group .= $word;
}
} elseif ( $found == 'line-end' ) {
$piece = $stack->top;
// A heading must be open, otherwise \n wouldn't have been in the search list
+ // FIXME: Don't use assert()
+ // phpcs:ignore MediaWiki.Usage.ForbiddenFunctions.assert
assert( $piece->open === "\n" );
$part = $piece->getCurrentPart();
// Search back through the input to see if it has a proper close.
} elseif ( $found == 'line-end' ) {
$piece = $stack->top;
// A heading must be open, otherwise \n wouldn't have been in the search list
+ // FIXME: Don't use assert()
+ // phpcs:ignore MediaWiki.Usage.ForbiddenFunctions.assert
assert( $piece->open === "\n" );
$part = $piece->getCurrentPart();
// Search back through the input to see if it has a proper close.