@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * |
35 | 35 | * @param array $instance The array of keys and values for the widget |
36 | 36 | */ |
37 | - public function form( $instance ) |
|
37 | + public function form($instance) |
|
38 | 38 | { |
39 | 39 | $form = $this->get_form(); |
40 | 40 | $components = $form->get_components(); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $form->update($instance); |
43 | 43 | |
44 | 44 | // Set the widget-specific names and ids |
45 | - foreach( $components as $component ) |
|
45 | + foreach ($components as $component) |
|
46 | 46 | { |
47 | 47 | $component->original_name = $component->name; |
48 | 48 | $component->id = $this->get_field_id($component->name); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | include __DIR__.'/Form.phtml'; |
53 | 53 | |
54 | 54 | // Use the original names again (for when the components update) |
55 | - foreach( $components as $component ) |
|
55 | + foreach ($components as $component) |
|
56 | 56 | { |
57 | 57 | $component->id = $component->original_name; |
58 | 58 | $component->name = $component->original_name; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * @param array $new_instance The previous instance of values before the update. |
66 | 66 | * @param array $old_instance The new instance of values to be generated via the update. |
67 | 67 | */ |
68 | - public function update( $new_instance, $old_instance ) |
|
68 | + public function update($new_instance, $old_instance) |
|
69 | 69 | { |
70 | 70 | $form = $this->get_form(); |
71 | 71 | return $form->update($new_instance, $old_instance); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | private function get_form() |
80 | 80 | { |
81 | - if( !isset($this->ui_form) ) |
|
81 | + if (!isset($this->ui_form)) |
|
82 | 82 | { |
83 | 83 | $config = $this->get_config(); |
84 | 84 | $this->ui_form = new \Amarkal\UI\Form($config['fields']); |
@@ -111,14 +111,14 @@ discard block |
||
111 | 111 | */ |
112 | 112 | private function get_config() |
113 | 113 | { |
114 | - if( !isset($this->config) ) |
|
114 | + if (!isset($this->config)) |
|
115 | 115 | { |
116 | 116 | $this->config = array_merge( |
117 | 117 | $this->default_config(), |
118 | 118 | $this->config() |
119 | 119 | ); |
120 | 120 | |
121 | - if( null === $this->config['id'] ) |
|
121 | + if (null === $this->config['id']) |
|
122 | 122 | { |
123 | 123 | throw new \RuntimeException('No \'id\' was sepcified in the widget configuration'); |
124 | 124 | } |