Issues (339)

src/Http/Controllers/Api/V1/UploadController.php (21 issues)

1
<?php
0 ignored issues
show
This file is missing a doc comment.
Loading history...
The PHP open tag does not have a corresponding PHP close tag
Loading history...
Filename "UploadController.php" doesn't match the expected filename "uploadcontroller.php"
Loading history...
2
0 ignored issues
show
Missing file doc comment
Loading history...
3
namespace UniSharp\Uploadable\Http\Controllers\Api\V1;
4
5
use Illuminate\Http\Request;
6
use UniSharp\Uploadable\File;
7
use UniSharp\Uploadable\Uploader;
8
use Illuminate\Routing\Controller;
9
10
class UploadController extends Controller
0 ignored issues
show
Coding Style Documentation introduced by
Missing class doc comment
Loading history...
11
{
0 ignored issues
show
Opening brace should be on the same line as the declaration for class UploadController
Loading history...
12
    public function store(Request $request)
0 ignored issues
show
Expected 2 blank lines before function; 0 found
Loading history...
Missing function doc comment
Loading history...
13
    {
0 ignored issues
show
Opening brace should be on the same line as the declaration
Loading history...
14
        return Uploader::upload(array_first($request->file()));
15
    }
0 ignored issues
show
Expected 2 blank lines after function; 1 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected //end store()
Loading history...
16
17
    public function destroy(File $file)
0 ignored issues
show
Missing function doc comment
Loading history...
18
    {
0 ignored issues
show
Opening brace should be on the same line as the declaration
Loading history...
19
        $file->remove();
20
21
        return ['success' => true];
0 ignored issues
show
Short array syntax is not allowed
Loading history...
TRUE, FALSE and NULL should be uppercase as per the configured coding-style; instead of true please use TRUE.
Loading history...
22
    }
0 ignored issues
show
Expected 2 blank lines after function; 0 found
Loading history...
Expected 1 blank line before closing function brace; 0 found
Loading history...
Expected //end destroy()
Loading history...
23
}
0 ignored issues
show
Expected //end class
Loading history...
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
24