Passed
Push — develop ( ab48c6...749573 )
by Richard
03:00
created

LsfHidden::response()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Riclep\StoryblokForms\Blocks;
4
5
use Illuminate\Support\Str;
6
use Riclep\StoryblokForms\Input;
7
8
class LsfHidden extends Input
9
{
10
	// Interface this....
11
12
	protected string $type = 'input';
13
14
	/**
15
	 * All the Validation rules for this Input
16
	 *
17
	 * @return mixed
18
	 */
19
	public function errorMessages(): mixed
20
	{
21
		return [];
22
	}
23
24
	/**
25
	 * Returns the Input’s response after the form has been submitted and validated
26
	 *
27
	 * @param $input
28
	 * @return array
29
	 */
30
	public function response($input): array
31
	{
32
		return [
33
			'label' => $this->label,
0 ignored issues
show
Bug Best Practice introduced by
The property label does not exist on Riclep\StoryblokForms\Blocks\LsfHidden. Since you implemented __get, consider adding a @property annotation.
Loading history...
34
			'name' => $this->name,
0 ignored issues
show
Bug Best Practice introduced by
The property name does not exist on Riclep\StoryblokForms\Blocks\LsfHidden. Since you implemented __get, consider adding a @property annotation.
Loading history...
35
			'response' => $input,
36
			'type' => $this->type,
37
		];
38
	}
39
}