Completed
Push — master ( 395fb2...b0764c )
by he
10:48 queued 10s
created

ReportRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 7
c 1
b 0
f 1
dl 0
loc 14
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSolutionId() 0 3 1
A rules() 0 7 1
1
<?php
2
3
namespace App\Http\Requests\Judger;
4
5
class ReportRequest extends JudgerRequest
6
{
7
    public function getSolutionId()
8
    {
9
        return $this->input('solution_id');
10
    }
11
12
    public function rules()
13
    {
14
        return [
15
            'solution_id' => 'required|int',
16
            'status'      => 'required|int|between:2,12',
17
            'time_cost'   => 'int',
18
            'memory_cost' => 'int',
19
        ];
20
    }
21
}
22