@@ -117,7 +117,8 @@ |
||
117 | 117 | try { |
118 | 118 | $parent = new org_openpsa_projects_project($this->task->project); |
119 | 119 | $options['success_url'] = 'project/' . $parent->guid . '/'; |
120 | - } catch (midcom_error $e) { |
|
120 | + } |
|
121 | + catch (midcom_error $e) { |
|
121 | 122 | $e->log(); |
122 | 123 | } |
123 | 124 |
@@ -60,7 +60,7 @@ |
||
60 | 60 | MIDCOM_TOOLBAR_ACCESSKEY => 'e', |
61 | 61 | ]); |
62 | 62 | |
63 | - if ( $this->task->reportedHours == 0 |
|
63 | + if ($this->task->reportedHours == 0 |
|
64 | 64 | && $this->task->can_do('midgard:delete')) { |
65 | 65 | $delete_workflow = $this->get_workflow('delete', ['object' => $this->task]); |
66 | 66 | $buttons[] = $delete_workflow->get_button("task/delete/{$this->task->guid}/"); |
@@ -112,7 +112,8 @@ |
||
112 | 112 | MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/jump-to.png', |
113 | 113 | ]; |
114 | 114 | } |
115 | - } catch (midcom_error $e) { |
|
115 | + } |
|
116 | + catch (midcom_error $e) { |
|
116 | 117 | } |
117 | 118 | } |
118 | 119 |
@@ -30,7 +30,8 @@ |
||
30 | 30 | $this->config = $config; |
31 | 31 | } |
32 | 32 | |
33 | - protected function cast($value) { |
|
33 | + protected function cast($value) |
|
34 | + { |
|
34 | 35 | if ($this->config['type'] == 'number' && !is_numeric($value)) { |
35 | 36 | $value = (float) $value; |
36 | 37 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | foreach ($this->schemadb->all() as $schema) { |
53 | 53 | $schema->set('operations', $operations); |
54 | 54 | if ($schema->has_field('title')) { |
55 | - $field =& $schema->get_field('title'); |
|
55 | + $field = & $schema->get_field('title'); |
|
56 | 56 | $field['hidden'] = true; |
57 | 57 | } |
58 | 58 | } |
@@ -98,7 +98,7 @@ |
||
98 | 98 | |
99 | 99 | public function reverseTransform($array) |
100 | 100 | { |
101 | - if (!is_array($array) ) { |
|
101 | + if (!is_array($array)) { |
|
102 | 102 | throw new TransformationFailedException('Expected an array.'); |
103 | 103 | } |
104 | 104 | if (!empty($array)) { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | 'write_privilege' => ['privilege' => 'midcom:urlname'] |
29 | 29 | ]); |
30 | 30 | |
31 | - $resolver->setNormalizer('type_config', function (Options $options, $value) { |
|
31 | + $resolver->setNormalizer('type_config', function(Options $options, $value) { |
|
32 | 32 | $type_defaults = [ |
33 | 33 | 'allow_catenate' => false, |
34 | 34 | 'allow_unclean' => false, |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | ]; |
37 | 37 | return helper::resolve_options($type_defaults, $value); |
38 | 38 | }); |
39 | - $resolver->setNormalizer('constraints', function (Options $options, $value) { |
|
39 | + $resolver->setNormalizer('constraints', function(Options $options, $value) { |
|
40 | 40 | $validator_options = $options['type_config']; |
41 | 41 | $validator_options['storage'] = $options['storage']; |
42 | 42 | $validator_options['property'] = $options['dm2_storage']; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | public function configureOptions(OptionsResolver $resolver) |
27 | 27 | { |
28 | 28 | $resolver->setDefault('error_bubbling', false); |
29 | - $resolver->setNormalizer('type_config', function (Options $options, $value) { |
|
29 | + $resolver->setNormalizer('type_config', function(Options $options, $value) { |
|
30 | 30 | $type_defaults = [ |
31 | 31 | 'options' => [], |
32 | 32 | 'allow_other' => false, |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | // Get the calendar root event |
24 | 24 | if ($root_event = org_openpsa_calendar_interface::find_root_event()) { |
25 | - $field =& $schemadb->get('default')->get_field('calendar'); |
|
25 | + $field = & $schemadb->get('default')->get_field('calendar'); |
|
26 | 26 | $field['type_config']['privilege_object'] = $root_event; |
27 | 27 | $field['type_config']['assignee'] = 'group:' . $group->guid; |
28 | 28 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | // Get the calendar root event |
24 | 24 | if ($root_event = org_openpsa_calendar_interface::find_root_event()) { |
25 | - $field =& $schemadb->get('default')->get_field('calendar'); |
|
25 | + $field = & $schemadb->get('default')->get_field('calendar'); |
|
26 | 26 | $field['type_config']['privilege_object'] = $root_event; |
27 | 27 | $field['type_config']['assignee'] = 'user:' . $person->guid; |
28 | 28 | } |