SergiX44/XBackBone

View on GitHub
app/Controllers/UploadController.php

Summary

Maintainability
A
2 hrs
Test Coverage

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

    protected function saveMedia(Response $response, UploadedFileInterface $file, $user, $code)
    {
        if ($code === null) {
            do {
                $code = humanRandomString();
Severity: Minor
Found in app/Controllers/UploadController.php - About 1 hr to fix

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

        public function uploadEndpoint(Request $request, Response $response): Response
        {
            if ($this->config['maintenance']) {
                $this->json['message'] = 'Endpoint under maintenance.';
    
    
    Severity: Minor
    Found in app/Controllers/UploadController.php - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status