Usage of Yoda conditions is not allowed; switch the expression order

Change-Id: I3e3ca5e380521b514062953d4aeb635793819e89
This commit is contained in:
Umherirrender 2020-11-19 22:34:09 +01:00
parent 4f72fb13be
commit dc007663b2
2 changed files with 1 additions and 2 deletions

View file

@ -1,7 +1,6 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="Generic.ControlStructures.DisallowYodaConditions.Found" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />

View file

@ -382,7 +382,7 @@ class MathMathML extends MathRenderer {
* @return Title|string
*/
private function getFallbackImageUrl( $noRender = false ) {
if ( 'png' === $this->getMode() && $this->pngPath ) {
if ( $this->getMode() === 'png' && $this->pngPath ) {
return $this->pngPath;
}
if ( $this->svgPath ) {