Split assignment and return statement

Doing it in two lines makes it easier to read
This makes also clear that this is not a broken condition

Change-Id: Ia7bc4ae1864d8c3fc2ad0b0ae55ec3137e8eaa12
This commit is contained in:
Umherirrender 2018-02-06 21:16:40 +01:00
parent 52e51ab3ea
commit 449e60e3c0

View file

@ -257,10 +257,10 @@ class WikiEditorHooks {
* @return string
*/
private static function getEditingStatsId() {
if ( self::$statsId ) {
return self::$statsId;
if ( !self::$statsId ) {
self::$statsId = MWCryptRand::generateHex( 32 );
}
return self::$statsId = MWCryptRand::generateHex( 32 );
return self::$statsId;
}
/**