Skip to content

Commit

Permalink
return types
Browse files Browse the repository at this point in the history
  • Loading branch information
skerbis authored Jun 27, 2022
1 parent 76c0f76 commit 202110d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/pdfout.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class PdfOut extends Dompdf
{
public static function sendPdf($name = 'pdf_file', $html = '', $orientation = 'portrait', $defaultFont = 'Courier', $attachment = false, $remoteFiles = true, $saveToPath = '')
public static function sendPdf($name = 'pdf_file', $html = '', $orientation = 'portrait', $defaultFont = 'Courier', $attachment = false, $remoteFiles = true, $saveToPath = ''): void
{
rex_response::cleanOutputBuffers(); // OutputBuffer leeren
$pdf = new self();
Expand All @@ -21,7 +21,6 @@ public static function sendPdf($name = 'pdf_file', $html = '', $orientation = 'p

// Rendern des PDF
$pdf->render();

// Ausliefern des PDF - entweder anzeigen der File oder auf Server speichern
if($saveToPath == '') {
header('Content-Type: application/pdf');
Expand All @@ -33,7 +32,7 @@ public static function sendPdf($name = 'pdf_file', $html = '', $orientation = 'p

}

public static function viewer($file = '')
public static function viewer($file = ''): string
{
if ($file!='')
{
Expand Down

0 comments on commit 202110d

Please sign in to comment.