Test Setup Failed
Push — master ( ef01f5...f5549a )
by John
07:56 queued 02:10
created
app/Http/Controllers/VirtualJudge/NOJ/NOJ.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
         $this->post_data=$all_data;
40 40
     }
41 41
 
42
-    public function submitJudger($submitURL,$data)
42
+    public function submitJudger($submitURL, $data)
43 43
     {
44
-        $judgeClient = new JudgeClient($data["token"], $submitURL);
44
+        $judgeClient=new JudgeClient($data["token"], $submitURL);
45 45
         return $judgeClient->judge($data["solution"], $data["language"], $data["test_case_id"], [
46 46
             'output' => true,
47 47
             'max_cpu_time'=>$data['max_cpu_time'],
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
             'coid' => 'required|integer',
57 57
             'solution' => 'required',
58 58
         ])->validate();
59
-        $judgerModel = new JudgerModel();
60
-        $problemModel = new ProblemModel();
61
-        $contestModel = new ContestModel();
62
-        $bestServer = $judgerModel->server(1);
59
+        $judgerModel=new JudgerModel();
60
+        $problemModel=new ProblemModel();
61
+        $contestModel=new ContestModel();
62
+        $bestServer=$judgerModel->server(1);
63 63
         if (is_null($bestServer)) {
64 64
             return ResponseModel::err(6001);
65 65
         }
@@ -68,12 +68,12 @@  discard block
 block discarded – undo
68 68
         $this->sub['pid']=$this->post_data["pid"];
69 69
         $this->sub['coid']=$this->post_data["coid"];
70 70
         $probBasic=$problemModel->basic($this->post_data["pid"]);
71
-        $submitURL="http://" . $bestServer["host"] . ":" . $bestServer["port"];
72
-        $submit_data = [
71
+        $submitURL="http://".$bestServer["host"].":".$bestServer["port"];
72
+        $submit_data=[
73 73
             "solution" => $this->post_data["solution"],
74 74
             "language" => $this->post_data["lang"],
75 75
             "max_cpu_time" => $probBasic["time_limit"],
76
-            "max_memory" => $probBasic["memory_limit"]*1024,
76
+            "max_memory" => $probBasic["memory_limit"] * 1024,
77 77
             "test_case_id" => $probBasic["pcode"],
78 78
             "token" => $bestServer["token"]
79 79
         ];
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         if (isset($this->post_data["contest"])) {
83 83
             $this->sub['cid']=$this->post_data["contest"];
84
-            if($contestModel->rule($this->sub['cid'])==2) {
84
+            if ($contestModel->rule($this->sub['cid'])==2) {
85 85
                 // OI Mode
86 86
                 if (!is_null($temp["err"])) {
87 87
                     $this->sub['verdict']="Compile Error";
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                     }
101 101
                 }
102 102
 
103
-                if($this->sub["score"]==0){
103
+                if ($this->sub["score"]==0) {
104 104
                     $this->sub['verdict']=$this->verdictDict[$temp["data"][0]];
105 105
                     $this->sub['time']=$temp["data"][0]["cpu_time"];
106 106
                     $this->sub['memory']=$temp["data"][0]["memory"];
Please login to merge, or discard this patch.