Completed
Push — master ( d244a1...8fd770 )
by Anton
01:17
created

PostRequest::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 9.7
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of Laravel Paket.
5
 *
6
 * (c) Anton Komarev <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Cog\Laravel\Paket\Http\Controllers\Api\Jobs;
15
16
use Illuminate\Foundation\Http\FormRequest;
17
18
final class PostRequest extends FormRequest
19
{
20
    public function rules(): array
21
    {
22
        return [
23
            'requirement.name' => [
24
                'required',
25
                'string',
26
            ],
27
            'requirement.version' => [
28
                'nullable',
29
                'string',
30
            ],
31
            'requirement.isDevelopment' => [
32
                'nullable',
33
                'boolean',
34
            ],
35
        ];
36
    }
37
}
38