LsfHidden   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A errorMessages() 0 3 1
A response() 0 7 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
}