LsfCheckbox   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A response() 0 7 1
1
<?php
2
3
namespace Riclep\StoryblokForms\Blocks;
4
5
use Riclep\StoryblokForms\Input;
6
7
class LsfCheckbox extends Input
8
{
9
	protected string $type = 'input';
10
11
	/**
12
	 * Returns the Input’s response after the form has been submitted and validated
13
	 *
14
	 * @param $input
15
	 * @return array
16
	 */
17
	public function response($input): array
18
	{
19
		return [
20
			'label' => $this->label,
0 ignored issues
show
Bug Best Practice introduced by
The property label does not exist on Riclep\StoryblokForms\Blocks\LsfCheckbox. Since you implemented __get, consider adding a @property annotation.
Loading history...
21
			'name' => $this->name,
0 ignored issues
show
Bug Best Practice introduced by
The property name does not exist on Riclep\StoryblokForms\Blocks\LsfCheckbox. Since you implemented __get, consider adding a @property annotation.
Loading history...
22
			'response' => $input,
23
			'type' => $this->type,
24
		];
25
	}
26
}