/** * @param Style $styleToUpdate (passed as reference) * @param Style $baseStyle * @return void */ private function mergeFontStyles($styleToUpdate, $baseStyle) { if (!$this->hasSetFontBold && $baseStyle->isFontBold()) { $styleToUpdate->setFontBold(); } if (!$this->hasSetFontItalic && $baseStyle->isFontItalic()) { $styleToUpdate->setFontItalic(); } if (!$this->hasSetFontUnderline && $baseStyle->isFontUnderline()) { $styleToUpdate->setFontUnderline(); } if (!$this->hasSetFontStrikethrough && $baseStyle->isFontStrikethrough()) { $styleToUpdate->setFontStrikethrough(); } }