@@ -13,7 +13,7 @@ |
||
13 | 13 | $form = Mockery::mock(FormModel::class) |
14 | 14 | ->makePartial(); |
15 | 15 | |
16 | - $form->shouldReceive('getModelForRole')->andReturnUsing(function ($role) use ($form) { |
|
16 | + $form->shouldReceive('getModelForRole')->andReturnUsing(function($role) use ($form) { |
|
17 | 17 | return $form->getModel(); |
18 | 18 | }); |
19 | 19 |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | |
43 | 43 | protected function getFormValueRecord($model) |
44 | 44 | { |
45 | - $values = FindValuesByFormConsumer::for($this->getItem()->getFormBuilder(), $model)->handle(); |
|
45 | + $values = FindValuesByFormConsumer::for ($this->getItem()->getFormBuilder(), $model)->handle(); |
|
46 | 46 | |
47 | - return FindOrCreateFormValueFromList::for($values)->fieldValue($this->getItem()); |
|
47 | + return FindOrCreateFormValueFromList::for ($values)->fieldValue($this->getItem()); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -102,6 +102,6 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function getFormName(): string |
104 | 104 | { |
105 | - return $this->getName().'-'.sha1($this->getItem()->id ?? ''); |
|
105 | + return $this->getName() . '-' . sha1($this->getItem()->id ?? ''); |
|
106 | 106 | } |
107 | 107 | } |
@@ -34,8 +34,8 @@ |
||
34 | 34 | public static function forForm(Form $form, $fieldsCollection = null): static |
35 | 35 | { |
36 | 36 | $action = new static($form, $fieldsCollection); |
37 | - $action->setConsumer(GetConsumerForForm::for($form)->handle()); |
|
38 | - $action->setConsumerConfigGenerateCallback(function () use ($action) { |
|
37 | + $action->setConsumer(GetConsumerForForm::for ($form)->handle()); |
|
38 | + $action->setConsumerConfigGenerateCallback(function() use ($action) { |
|
39 | 39 | return GetConsumerConfig::forConsumer($action->getConsumer())->handle(); |
40 | 40 | }); |
41 | 41 |
@@ -9,7 +9,7 @@ |
||
9 | 9 | { |
10 | 10 | protected $list; |
11 | 11 | |
12 | - public static function for(FormValuesConsumerList $list) |
|
12 | + public static function for (FormValuesConsumerList $list) |
|
13 | 13 | { |
14 | 14 | $action = new static(); |
15 | 15 | $action->list = $list; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $this->list = new FormValuesConsumerList($form, $consumer); |
21 | 21 | } |
22 | 22 | |
23 | - public static function for($form, $consumer) |
|
23 | + public static function for ($form, $consumer) |
|
24 | 24 | { |
25 | 25 | return new static($form, $consumer); |
26 | 26 | } |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | |
51 | 51 | return [ |
52 | 52 | 'where' => [ |
53 | - ['id_form = ?', $this->list->getForm()->id,], |
|
54 | - ['consumer = ?', $consumer->getManager()->getMorphName(),], |
|
55 | - ['consumer_id = ?', $consumer->id,], |
|
53 | + ['id_form = ?', $this->list->getForm()->id, ], |
|
54 | + ['consumer = ?', $consumer->getManager()->getMorphName(), ], |
|
55 | + ['consumer_id = ?', $consumer->id, ], |
|
56 | 56 | ], |
57 | 57 | ]; |
58 | 58 | } |