Controller/Adminhtml/Order/Invoice/Printpdf.php
Method __construct
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Context $context,
Registry $coreRegistry,
Config $emailConfig,
JsonFactory $resultJsonFactory,
Pdf $helper,
Method execute
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute()
{
$templateId = $this->getRequest()->getParam('template_id');
Avoid too many return
statements within this method. Open
Open
return $this->fileFactory->create(
$fileName,
$pdfFileData['filestream'],
DirectoryList::VAR_DIR,
'application/pdf'