Passed
Push — master ( 97105a...12163f )
by John
05:10
created

SubmissionController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A detail() 0 6 1
1
<?php
2
3
namespace App\Http\Controllers\Ajax;
4
5
use App\Models\ProblemModel;
6
use App\Models\SubmissionModel;
7
use App\Models\ResponseModel;
8
use App\Models\CompilerModel;
9
use App\Http\Controllers\VirtualJudge\Submit;
10
use App\Http\Controllers\VirtualJudge\Judge;
11
use App\Http\Controllers\Controller;
12
use Illuminate\Http\Request;
13
use Illuminate\Http\Response;
14
use App\Http\Controllers\VirtualCrawler\Crawler;
15
use App\Jobs\ProcessSubmission;
16
use Illuminate\Support\Facades\Validator;
17
use Auth;
18
19
class SubmissionController extends Controller
20
{
21
    /**
22
     * The Ajax Submission Detail.
23
     *
24
     * @param Request $request web request
25
     *
26
     * @return Response
27
     */
28
    public function detail(Request $request)
29
    {
30
        $all_data=$request->all();
31
        $submission=new SubmissionModel();
32
        $status=$submission->getJudgeStatus($all_data["sid"], Auth::user()->id);
33
        return ResponseModel::success(200, null, $status);
0 ignored issues
show
Bug Best Practice introduced by
The expression return App\Models\Respon...ess(200, null, $status) returns the type Illuminate\Http\JsonResponse which is incompatible with the documented return type Illuminate\Http\Response.
Loading history...
34
    }
35
}
36