- 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;
- }