EaDesgin/magento2-pdf-generator2

View on GitHub
Controller/Adminhtml/Order/Invoice/Printpdf.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method __construct has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

        Context $context,
        Registry $coreRegistry,
        Config $emailConfig,
        JsonFactory $resultJsonFactory,
        Pdf $helper,
Severity: Major
Found in Controller/Adminhtml/Order/Invoice/Printpdf.php - About 1 hr to fix

    Method execute has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function execute()
        {
    
            $templateId = $this->getRequest()->getParam('template_id');
    
    
    Severity: Minor
    Found in Controller/Adminhtml/Order/Invoice/Printpdf.php - About 1 hr to fix

      Avoid too many return statements within this method.
      Open

              return $this->fileFactory->create(
                  $fileName,
                  $pdfFileData['filestream'],
                  DirectoryList::VAR_DIR,
                  'application/pdf'
      Severity: Major
      Found in Controller/Adminhtml/Order/Invoice/Printpdf.php - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status