Passed
Push — develop ( 818657...0831fb )
by Richard
06:51 queued 03:59
created

LsfCheckbox::response()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
c 0
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 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
}