GaryClarke / async-symfony

Repository to accompany the YouTube series
15 stars 31 forks source link

Suggestion: replace MPDF-Output Parameter 'S' with Mpdf\Output\Destination::STRING_RETURN #12

Closed akrys closed 2 years ago

akrys commented 2 years ago

I just watched the video "Creating a PDF file in PHP using Mpdf" and I wondered what that parameter 'S' could mean in this line:

$contractNotePdf = $mpdf->output('', 'S');

So, I looked into the lib and I found that they use Mpdf\Output\Destination::STRING_RETURN for testing. (This is basically 'S')

I'd suggest to use the line as $contractNotePdf = $mpdf->output('', Mpdf\Output\Destination::STRING_RETURN);

This way it would be much easier to understand the meaning of this parameter.

GaryClarke commented 2 years ago

Sounds good to me. Happy to merge that in if you send a PR.