@@ -39,7 +39,7 @@ |
||
39 | 39 | public function _handler_create($handler_id, array $args, array &$data) |
40 | 40 | { |
41 | 41 | $this->_current_object = midcom::get()->dbfactory->get_object_by_guid($args[0]); |
42 | - $entry= new org_openpsa_relatedto_journal_entry_dba(); |
|
42 | + $entry = new org_openpsa_relatedto_journal_entry_dba(); |
|
43 | 43 | $entry->linkGuid = $this->_current_object->guid; |
44 | 44 | |
45 | 45 | midcom::get()->head->set_pagetitle($this->_l10n->get('add journal entry')); |
@@ -72,7 +72,7 @@ |
||
72 | 72 | |
73 | 73 | $this->_group = new org_openpsa_contacts_group_dba(); |
74 | 74 | |
75 | - if ( $this->_type == 'organization' |
|
75 | + if ($this->_type == 'organization' |
|
76 | 76 | && $this->_parent_group) { |
77 | 77 | $this->_group->owner = $this->_parent_group->id; |
78 | 78 | } else { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $resolver->setDefaults([ |
39 | 39 | 'error_bubbling' => false |
40 | 40 | ]); |
41 | - $resolver->setNormalizer('widget_config', function (Options $options, $value) { |
|
41 | + $resolver->setNormalizer('widget_config', function(Options $options, $value) { |
|
42 | 42 | $widget_defaults = [ |
43 | 43 | 'showOn' => 'both', |
44 | 44 | 'format' => '%Y-%m-%d %H:%M', |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | ]; |
50 | 50 | return helper::resolve_options($widget_defaults, $value); |
51 | 51 | }); |
52 | - $resolver->setNormalizer('type_config', function (Options $options, $value) { |
|
52 | + $resolver->setNormalizer('type_config', function(Options $options, $value) { |
|
53 | 53 | $type_defaults = [ |
54 | 54 | 'storage_type' => jsdate::ISO, |
55 | 55 | 'min_date' => null, |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | ]; |
59 | 59 | return helper::resolve_options($type_defaults, $value); |
60 | 60 | }); |
61 | - $resolver->setNormalizer('constraints', function (Options $options, $value) { |
|
61 | + $resolver->setNormalizer('constraints', function(Options $options, $value) { |
|
62 | 62 | if ($options['type_config']['later_than']) { |
63 | 63 | return [new laterthan($options['type_config']['later_than'])]; |
64 | 64 | } |
@@ -187,11 +187,11 @@ |
||
187 | 187 | * (to avoid stupid one second overlaps) |
188 | 188 | */ |
189 | 189 | $this->start = mktime(date('G', $this->start), |
190 | - date('i', $this->start), |
|
191 | - 1, |
|
192 | - date('n', $this->start), |
|
193 | - date('j', $this->start), |
|
194 | - date('Y', $this->start)); |
|
190 | + date('i', $this->start), |
|
191 | + 1, |
|
192 | + date('n', $this->start), |
|
193 | + date('j', $this->start), |
|
194 | + date('Y', $this->start)); |
|
195 | 195 | $this->end = mktime(date('G', $this->end), |
196 | 196 | date('i', $this->end), |
197 | 197 | 0, |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | public function get_parent_guid_uncached() |
83 | 83 | { |
84 | - if ( $this->up |
|
84 | + if ($this->up |
|
85 | 85 | || $this->title != '__org_openpsa_calendar') { |
86 | 86 | $root_event = org_openpsa_calendar_interface::find_root_event(); |
87 | 87 | if ($this->id != $root_event->id) { |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | } |
142 | 142 | |
143 | 143 | //Check up |
144 | - if ( !$this->up |
|
144 | + if (!$this->up |
|
145 | 145 | && $this->title != '__org_openpsa_calendar') { |
146 | 146 | $root_event = org_openpsa_calendar_interface::find_root_event(); |
147 | 147 | $this->up = $root_event->id; |
@@ -173,9 +173,9 @@ discard block |
||
173 | 173 | private function _check_timerange() |
174 | 174 | { |
175 | 175 | //Force types |
176 | - $this->start = (int)$this->start; |
|
177 | - $this->end = (int)$this->end; |
|
178 | - if ( !$this->start |
|
176 | + $this->start = (int) $this->start; |
|
177 | + $this->end = (int) $this->end; |
|
178 | + if (!$this->start |
|
179 | 179 | || !$this->end) { |
180 | 180 | debug_add('Event must have start and end timestamps'); |
181 | 181 | midcom_connection::set_error(MGD_ERR_RANGE); |
@@ -99,7 +99,7 @@ |
||
99 | 99 | $root_event = self::find_root_event(); |
100 | 100 | |
101 | 101 | $qb = org_openpsa_calendar_event_dba::new_query_builder(); |
102 | - $qb->add_constraint('up', '=', $root_event->id); |
|
102 | + $qb->add_constraint('up', '=', $root_event->id); |
|
103 | 103 | $dm = datamanager::from_schemadb($config->get('schemadb')); |
104 | 104 | |
105 | 105 | $indexer = new org_openpsa_calendar_midcom_indexer($topic, $indexer); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | $this->_controller = $this->load_controller(); |
103 | 103 | |
104 | - if ( $data['enable_versioning'] |
|
104 | + if ($data['enable_versioning'] |
|
105 | 105 | && !empty($_POST)) { |
106 | 106 | $this->_backup_attachment(); |
107 | 107 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $prefix = $node[MIDCOM_NAV_ABSOLUTEURL]; |
132 | 132 | } |
133 | 133 | |
134 | - return $prefix . "document/" . $this->_document->guid . "/"; |
|
134 | + return $prefix . "document/" . $this->_document->guid . "/"; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
@@ -50,6 +50,6 @@ |
||
50 | 50 | $indexer = new org_openpsa_documents_midcom_indexer($this->_topic); |
51 | 51 | $indexer->index($controller->get_datamanager()); |
52 | 52 | |
53 | - return $controller->get_datamanager()->get_storage()->get_value()->name. "/"; |
|
53 | + return $controller->get_datamanager()->get_storage()->get_value()->name . "/"; |
|
54 | 54 | } |
55 | 55 | } |
@@ -130,13 +130,13 @@ |
||
130 | 130 | */ |
131 | 131 | private function modify_schema(schema $schema) |
132 | 132 | { |
133 | - $vat_field =& $schema->get_field('vat'); |
|
134 | - $pdf_field =& $schema->get_field('pdf_file'); |
|
135 | - $due_field =& $schema->get_field('due'); |
|
136 | - $sent_field =& $schema->get_field('sent'); |
|
137 | - $paid_field =& $schema->get_field('paid'); |
|
138 | - $customer_field =& $schema->get_field('customer'); |
|
139 | - $contact_field =& $schema->get_field('customerContact'); |
|
133 | + $vat_field = & $schema->get_field('vat'); |
|
134 | + $pdf_field = & $schema->get_field('pdf_file'); |
|
135 | + $due_field = & $schema->get_field('due'); |
|
136 | + $sent_field = & $schema->get_field('sent'); |
|
137 | + $paid_field = & $schema->get_field('paid'); |
|
138 | + $customer_field = & $schema->get_field('customer'); |
|
139 | + $contact_field = & $schema->get_field('customerContact'); |
|
140 | 140 | |
141 | 141 | // Fill VAT select |
142 | 142 | $vat_array = explode(',', $this->_config->get('vat_percentages')); |
@@ -50,7 +50,8 @@ discard block |
||
50 | 50 | // We're creating invoice for chosen customer |
51 | 51 | try { |
52 | 52 | $this->customer = new org_openpsa_contacts_group_dba($args[0]); |
53 | - } catch (midcom_error $e) { |
|
53 | + } |
|
54 | + catch (midcom_error $e) { |
|
54 | 55 | $contact = new org_openpsa_contacts_person_dba($args[0]); |
55 | 56 | $this->contact_id = $contact->id; |
56 | 57 | } |
@@ -162,7 +163,8 @@ discard block |
||
162 | 163 | if (!empty($this->invoice->customer)) { |
163 | 164 | try { |
164 | 165 | $this->customer = org_openpsa_contacts_group_dba::get_cached($this->invoice->customer); |
165 | - } catch (midcom_error $e) { |
|
166 | + } |
|
167 | + catch (midcom_error $e) { |
|
166 | 168 | $customer_field['hidden'] = true; |
167 | 169 | $e->log(); |
168 | 170 | } |
@@ -9,11 +9,11 @@ |
||
9 | 9 | use midcom\datamanager\indexer\client; |
10 | 10 | use midcom\datamanager\datamanager; |
11 | 11 | |
12 | - /** |
|
13 | - * Indexer client class |
|
14 | - * |
|
15 | - * @package org.openpsa.invoices |
|
16 | - */ |
|
12 | + /** |
|
13 | + * Indexer client class |
|
14 | + * |
|
15 | + * @package org.openpsa.invoices |
|
16 | + */ |
|
17 | 17 | class org_openpsa_invoices_midcom_indexer extends client |
18 | 18 | { |
19 | 19 | public function prepare_document(midcom_services_indexer_document &$document, datamanager $dm) |