Merge "Fix PhanUndeclaredType* errors (#3)"
[lhc/web/wiklou.git] / includes / diff / DifferenceEngineSlotDiffRenderer.php
index 0c632b9..c389a6f 100644 (file)
@@ -46,15 +46,7 @@ class DifferenceEngineSlotDiffRenderer extends SlotDiffRenderer {
 
        /** @inheritDoc */
        public function getDiff( Content $oldContent = null, Content $newContent = null ) {
-               if ( !$oldContent && !$newContent ) {
-                       throw new InvalidArgumentException( '$oldContent and $newContent cannot both be null' );
-               }
-               if ( !$oldContent || !$newContent ) {
-                       $someContent = $newContent ?: $oldContent;
-                       $emptyContent = $someContent->getContentHandler()->makeEmptyContent();
-                       $oldContent = $oldContent ?: $emptyContent;
-                       $newContent = $newContent ?: $emptyContent;
-               }
+               $this->normalizeContents( $oldContent, $newContent );
                return $this->differenceEngine->generateContentDiffBody( $oldContent, $newContent );
        }