studioespresso/craft-exporter

View on GitHub
src/controllers/ElementController.php

Summary

Maintainability
A
1 hr
Test Coverage

Method actionRunExport has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Invalid

    public function actionRunExport()
    {
        $body = $this->request->getBodyParams();
        $elementId = Craft::$app->getRequest()->getRequiredBodyParam('elementId');
        $export = ExportElement::findOne(['id' => $elementId]);
Severity: Minor
Found in src/controllers/ElementController.php - About 1 hr to fix

    Method actionStep2 has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function actionStep2()
        {
            $body = $this->request->getBodyParams();
            $elementId = Craft::$app->getRequest()->getRequiredBodyParam('elementId');
            $export = ExportElement::findOne(['id' => $elementId]);
    Severity: Minor
    Found in src/controllers/ElementController.php - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status