TYPO3-Initiatives/adminpanel-extended

View on GitHub
Classes/Controller/SignalsAjaxController.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '68', column '23').
Open

            throw new \InvalidArgumentException(

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Returning type \TYPO3\CMS\Core\Http\JsonResponse but getData() is declared to return \Psr\Http\Message\ResponseInterface
Invalid

        return new JsonResponse($signalData, $statusCode);

Suspicious array access to \TYPO3\CMS\Adminpanel\ModuleApi\ModuleData
Invalid

            $logRecord = $moduleData['signals'][$signalId] ?? null;

There are no issues that match your filters.

Category
Status