Change if/else to a ternary operator
authorPlatonides <platonides@gmail.com>
Mon, 28 May 2012 17:37:35 +0000 (19:37 +0200)
committerAntoine Musso <hashar@free.fr>
Tue, 29 May 2012 18:58:15 +0000 (20:58 +0200)
This keep the wfProfileOut() detector happy.

Change-Id: I85ecc33121d94e6a2d2e8ea3d1f5ca47f3db86bc

includes/WikiPage.php

index fffd5f6..b5318c0 100644 (file)
@@ -530,11 +530,7 @@ class WikiPage extends Page {
                }
 
                wfProfileOut( __METHOD__ );
-               if ( $row ) {
-                       return Revision::newFromRow( $row );
-               } else {
-                       return null;
-               }
+               return $row ? Revision::newFromRow( $row ) : null;
        }
 
        /**