"Tim Starling" changed the status of MediaWiki.r102287 to "ok"
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/102287
Old status: new
> New status: ok
Commit summary for MediaWiki.r102287:
early returns to avoid long code in if / else
Instead of enclosing a lot of code in a if() {} block. I reverted the logic
to exit early. That makes code a bit easier to read.
Logic was:
if( $title->getNamespace() >= 0 && !$accErrors && $newid ) {
// LOT OF CODE
}
return;
Now:
if( $title->getNamespace() < 0 || $accErrors || !$newid ) {
return;
}
// LOT OF CODE
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview