Code Duplication    Length = 6-6 lines in 2 locations

core/libraries/messages/messenger/EE_Pdf_messenger.class.php 1 location

@@ 322-327 (lines=6) @@
319
		$invoice_name = html_entity_decode( $this->_subject, ENT_QUOTES, "UTF-8");
320
321
		//only load dompdf if nobody else has yet...
322
		if( ! defined('DOMPDF_DIR')){
323
			define('DOMPDF_ENABLE_REMOTE', TRUE);
324
			define('DOMPDF_ENABLE_JAVASCRIPT', FALSE);
325
			define('DOMPDF_ENABLE_CSS_FLOAT', TRUE);
326
			require_once(EE_THIRD_PARTY . 'dompdf/dompdf_config.inc.php');
327
		}
328
		$dompdf = new DOMPDF();
329
		$dompdf->load_html($content);
330
		$dompdf->render();

modules/gateways/Invoice/lib/Invoice.class.php 1 location

@@ 195-200 (lines=6) @@
192
			echo $content;
193
		}else{
194
			//only load dompdf if nobody else has yet...
195
			if( ! defined('DOMPDF_DIR')){
196
				define('DOMPDF_ENABLE_REMOTE', TRUE);
197
				define('DOMPDF_ENABLE_JAVASCRIPT', FALSE);
198
				define('DOMPDF_ENABLE_CSS_FLOAT', TRUE);
199
				require_once(EE_THIRD_PARTY . 'dompdf/dompdf_config.inc.php');
200
			}
201
			$dompdf = new DOMPDF();
202
			$dompdf->load_html($content);
203
			$dompdf->render();