@@ -58,7 +58,7 @@ |
||
58 | 58 | } |
59 | 59 | $this->_view_toolbar->add_items($buttons); |
60 | 60 | |
61 | - if ( $this->_topic->can_do('midgard:update') |
|
61 | + if ($this->_topic->can_do('midgard:update') |
|
62 | 62 | && $this->_topic->can_do('midcom:component_config')) { |
63 | 63 | $this->_node_toolbar->add_item($workflow->get_button($this->router->generate('config'), [ |
64 | 64 | MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('component configuration'), |
@@ -171,7 +171,7 @@ |
||
171 | 171 | { |
172 | 172 | $this->prepare_toolbar(false); |
173 | 173 | |
174 | - if ( $this->_topic->can_do('midgard:update') |
|
174 | + if ($this->_topic->can_do('midgard:update') |
|
175 | 175 | && $this->_topic->can_do('midcom:component_config')) { |
176 | 176 | $workflow = $this->get_workflow('datamanager'); |
177 | 177 | $this->_node_toolbar->add_item($workflow->get_button($this->router->generate('config'), [ |
@@ -67,7 +67,7 @@ |
||
67 | 67 | MIDCOM_TOOLBAR_ACCESSKEY => 'e', |
68 | 68 | ]); |
69 | 69 | |
70 | - if ( $this->task->reportedHours == 0 |
|
70 | + if ($this->task->reportedHours == 0 |
|
71 | 71 | && $this->task->can_do('midgard:delete')) { |
72 | 72 | $delete_workflow = $this->get_workflow('delete', ['object' => $this->task]); |
73 | 73 | $buttons[] = $delete_workflow->get_button($this->router->generate('task_delete', ['guid' => $this->task->guid])); |
@@ -169,7 +169,7 @@ |
||
169 | 169 | case 'proposed': |
170 | 170 | $html = $this->render_status($task->manager, "from %s"); |
171 | 171 | $task->get_members(); |
172 | - if ( $task->can_do('midgard:update') |
|
172 | + if ($task->can_do('midgard:update') |
|
173 | 173 | && isset($task->resources[midcom_connection::get_user()])) { |
174 | 174 | $html .= '<form method="post" action="' . $this->router->generate('workflow', ['guid' => $task->guid]) . '">'; |
175 | 175 | //TODO: If we need all resources to accept task hide tools when we have accepted and replace with "pending acceptance from..." |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | public function purify_content(FormEvent $event) |
42 | 42 | { |
43 | - if ( isset($this->config['Cache']['SerializerPath']) |
|
43 | + if (isset($this->config['Cache']['SerializerPath']) |
|
44 | 44 | && !file_exists($this->config['Cache']['SerializerPath'])) { |
45 | 45 | mkdir($this->config['Cache']['SerializerPath']); |
46 | 46 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | // Load custom element/attribute definitions |
56 | 56 | $definitions = $this->get_from_global_config('html_purify_HTMLDefinition'); |
57 | - if ( !empty($definitions) |
|
57 | + if (!empty($definitions) |
|
58 | 58 | && $def = $purifier_config->maybeGetRawHTMLDefinition()) { |
59 | 59 | if (!empty($definitions['addAttribute'])) { |
60 | 60 | foreach (array_filter((array) $definitions['addAttribute'], 'is_array') as $attrdef) { |
@@ -23,7 +23,7 @@ |
||
23 | 23 | <th><?php echo $data['l10n']->get('type'); ?></th> |
24 | 24 | <?php |
25 | 25 | } ?> |
26 | -<?php if ( array_key_exists('invoiceable_filter', $query_data)) { |
|
26 | +<?php if (array_key_exists('invoiceable_filter', $query_data)) { |
|
27 | 27 | ?> |
28 | 28 | <th><?php echo midcom::get()->i18n->get_string('invoiceable', 'org.openpsa.projects'); ?></th> |
29 | 29 | <?php |
@@ -30,7 +30,7 @@ |
||
30 | 30 | return null; |
31 | 31 | } |
32 | 32 | |
33 | - if (! $input instanceof midcom_db_attachment) { |
|
33 | + if (!$input instanceof midcom_db_attachment) { |
|
34 | 34 | throw new UnexpectedTypeException($input, midcom_db_attachment::class); |
35 | 35 | } |
36 | 36 |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | 'customdata' => [] |
161 | 161 | ], $config)); |
162 | 162 | |
163 | - $normalize_widget = function (Options $options, $value) { |
|
163 | + $normalize_widget = function(Options $options, $value) { |
|
164 | 164 | if ($value == 'text') { |
165 | 165 | if (!empty($options['widget_config']['hideinput'])) { |
166 | 166 | return PasswordType::class; |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | return $value; |
186 | 186 | }; |
187 | 187 | |
188 | - $normalize_storage = function (Options $options, $value) use ($name) { |
|
188 | + $normalize_storage = function(Options $options, $value) use ($name) { |
|
189 | 189 | $default = [ |
190 | 190 | 'location' => 'parameter', |
191 | 191 | 'domain' => 'midcom.helper.datamanager2', |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | return $value; |
228 | 228 | }; |
229 | 229 | |
230 | - $normalize_validation = function (Options $options, $value) { |
|
230 | + $normalize_validation = function(Options $options, $value) { |
|
231 | 231 | $validation = []; |
232 | 232 | |
233 | 233 | foreach ((array) $value as $key => $rule) { |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $rule = ['type' => $rule]; |
240 | 240 | } elseif (!array_key_exists('type', $rule)) { |
241 | 241 | throw new midcom_error("Missing validation rule type for rule {$key} on field {$options['name']}, this is a required option."); |
242 | - } elseif ( $rule['type'] == 'compare' |
|
242 | + } elseif ($rule['type'] == 'compare' |
|
243 | 243 | && !array_key_exists('compare_with', $rule)) { |
244 | 244 | throw new midcom_error("Missing compare_with option for compare type rule {$key} on field {$options['name']}, this is a required option."); |
245 | 245 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | 'later_than' => null |
49 | 49 | ] |
50 | 50 | ]); |
51 | - $resolver->setNormalizer('widget_config', function (Options $options, $value) { |
|
51 | + $resolver->setNormalizer('widget_config', function(Options $options, $value) { |
|
52 | 52 | $widget_defaults = [ |
53 | 53 | 'showOn' => 'both', |
54 | 54 | 'format' => '%Y-%m-%d %H:%M', |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | ]; |
60 | 60 | return helper::normalize($widget_defaults, $value); |
61 | 61 | }); |
62 | - $resolver->setNormalizer('constraints', function (Options $options, $value) { |
|
62 | + $resolver->setNormalizer('constraints', function(Options $options, $value) { |
|
63 | 63 | if ($options['type_config']['later_than']) { |
64 | 64 | $value[] = new laterthan($options['type_config']['later_than']); |
65 | 65 | } |