Code Duplication    Length = 36-36 lines in 2 locations

app/Http/Requests/Admin/Video/CreateRequest.php 1 location

@@ 5-40 (lines=36) @@
2
3
use WITR\Http\Requests\Request;
4
5
class CreateRequest extends Request {
6
7
	/**
8
	 * Determine if the user is authorized to make this request.
9
	 *
10
	 * @return bool
11
	 */
12
	public function authorize()
13
	{
14
		return true;
15
	}
16
17
	/**
18
	 * Get the validation rules that apply to the request.
19
	 *
20
	 * @return array
21
	 */
22
	public function rules()
23
	{
24
		return [
25
			'artist' => 'required',
26
			'song' => 'required',
27
			'album' => 'required',
28
			'review' => 'required',
29
			'url_tag' => 'required'
30
		];
31
	}
32
33
	public function messages()
34
	{
35
		return [
36
			'url_tag.required' => 'The YouTube URL is required.',
37
		];
38
	}
39
40
}
41

app/Http/Requests/Admin/Video/UpdateRequest.php 1 location

@@ 5-40 (lines=36) @@
2
3
use WITR\Http\Requests\Request;
4
5
class UpdateRequest extends Request {
6
7
	/**
8
	 * Determine if the user is authorized to make this request.
9
	 *
10
	 * @return bool
11
	 */
12
	public function authorize()
13
	{
14
		return true;
15
	}
16
17
	/**
18
	 * Get the validation rules that apply to the request.
19
	 *
20
	 * @return array
21
	 */
22
	public function rules()
23
	{
24
		return [
25
			'artist' => 'required',
26
			'song' => 'required',
27
			'album' => 'required',
28
			'review' => 'required',
29
			'url_tag' => 'required'
30
		];
31
	}
32
33
	public function messages()
34
	{
35
		return [
36
			'url_tag.required' => 'The YouTube URL is required.',
37
		];
38
	}
39
40
}
41