@@ -63,7 +63,7 @@ |
||
63 | 63 | public function _on_created() |
64 | 64 | { |
65 | 65 | //Remove the resource if necessary |
66 | - if ( $this->type == self::DECLINED |
|
66 | + if ($this->type == self::DECLINED |
|
67 | 67 | && $this->targetPerson) { |
68 | 68 | $qb = org_openpsa_projects_task_resource_dba::new_query_builder(); |
69 | 69 | $qb->add_constraint('task', '=', $this->task); |
@@ -231,7 +231,7 @@ |
||
231 | 231 | $new_status = $this->_find_status($this->_status_map[$this->status_type], $status_types); |
232 | 232 | } |
233 | 233 | |
234 | - if ( !is_null($new_status) |
|
234 | + if (!is_null($new_status) |
|
235 | 235 | && $this->status != $new_status) { |
236 | 236 | $this->status = $new_status; |
237 | 237 | $update_required = true; |
@@ -68,7 +68,7 @@ |
||
68 | 68 | $status_changer_label = $this->l10n->get('system'); |
69 | 69 | $target_person_label = $this->l10n->get('system'); |
70 | 70 | |
71 | - if ( $status_change->metadata->creator |
|
71 | + if ($status_change->metadata->creator |
|
72 | 72 | && $status_change->metadata->creator != $fallback_creator->guid) { |
73 | 73 | $status_changer = org_openpsa_widgets_contact::get($status_change->metadata->creator); |
74 | 74 | $status_changer_label = $status_changer->show_inline(); |
@@ -152,7 +152,7 @@ |
||
152 | 152 | // Set the "now working on" status |
153 | 153 | $workingon = new org_openpsa_mypage_workingon(); |
154 | 154 | if (!$workingon->set($_POST['task'])) { |
155 | - midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.mypage'), 'Failed to set "working on" parameter to "' . $_POST['task'] . '", reason ' . midcom_connection::get_error_string(), 'error'); |
|
155 | + midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.mypage'), 'Failed to set "working on" parameter to "' . $_POST['task'] . '", reason ' . midcom_connection::get_error_string(), 'error'); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | return new midcom_response_relocate($relocate . "workingon/"); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | { |
55 | 55 | $this->calculate_price(false); |
56 | 56 | |
57 | - if ( $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
57 | + if ($this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
58 | 58 | && $this->continuous == true) { |
59 | 59 | $this->end = 0; |
60 | 60 | } elseif ($this->end < $this->start) { |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $calculator->run($this); |
141 | 141 | $cost = $calculator->get_cost(); |
142 | 142 | $price = $calculator->get_price(); |
143 | - if ( $price != $this->price |
|
143 | + if ($price != $this->price |
|
144 | 144 | || $cost != $this->cost) { |
145 | 145 | $this->price = $price; |
146 | 146 | $this->cost = $cost; |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $units = $agreement_hours['invoiceable']; |
188 | 188 | $uninvoiceableUnits = $agreement_hours['reported'] - ($agreement_hours['invoiceable'] + $agreement_hours['invoiced']); |
189 | 189 | |
190 | - if ( $units != $this->units |
|
190 | + if ($units != $this->units |
|
191 | 191 | || $uninvoiceableUnits != $this->uninvoiceableUnits) { |
192 | 192 | debug_add("agreement values have changed, setting units to " . $units . ", uninvoiceable: " . $uninvoiceableUnits); |
193 | 193 | $this->units = $units; |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | |
243 | 243 | public function invoice() |
244 | 244 | { |
245 | - if ( $this->state >= self::STATE_INVOICED |
|
245 | + if ($this->state >= self::STATE_INVOICED |
|
246 | 246 | || $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION) { |
247 | 247 | return false; |
248 | 248 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | private function _find_suspects_event(midcom_core_dbaobject $object, $defaults, array &$links_array) |
55 | 55 | { |
56 | - if ( !is_array($object->participants) |
|
56 | + if (!is_array($object->participants) |
|
57 | 57 | || count($object->participants) < 2) { |
58 | 58 | //We have invalid list or less than two participants, abort |
59 | 59 | return; |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | public function new_subscription_cycle(array $args, midcom_baseclasses_components_cron_handler $handler) |
146 | 146 | { |
147 | - if ( !isset($args['deliverable']) |
|
147 | + if (!isset($args['deliverable']) |
|
148 | 148 | || !isset($args['cycle'])) { |
149 | 149 | $handler->print_error('deliverable GUID or cycle number not set, aborting'); |
150 | 150 | return false; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | } |
92 | 92 | $profit = $value - $cost; |
93 | - if ( $this->value != $value |
|
93 | + if ($this->value != $value |
|
94 | 94 | || $this->profit != $profit) { |
95 | 95 | $this->value = $value; |
96 | 96 | $this->profit = $value - $cost; |
@@ -220,12 +220,12 @@ discard block |
||
220 | 220 | |
221 | 221 | public function _on_updating() |
222 | 222 | { |
223 | - if ( $this->state != self::STATE_ACTIVE |
|
223 | + if ($this->state != self::STATE_ACTIVE |
|
224 | 224 | && !$this->end) { |
225 | 225 | //Not active anymore and end not set, set it to now |
226 | 226 | $this->end = time(); |
227 | 227 | } |
228 | - if ( $this->end |
|
228 | + if ($this->end |
|
229 | 229 | && $this->state == self::STATE_ACTIVE) { |
230 | 230 | //Returned to active state, clear the end marker. |
231 | 231 | $this->end = 0; |
@@ -78,7 +78,7 @@ |
||
78 | 78 | { |
79 | 79 | parent::__set($property, $value); |
80 | 80 | |
81 | - if ( $property == 'firstname' |
|
81 | + if ($property == 'firstname' |
|
82 | 82 | || $property == 'lastname' |
83 | 83 | || $property == 'homepage' |
84 | 84 | || $property == 'email') { |
@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | return preg_replace_callback( |
39 | 39 | "%(<\s*)+(/\s*)+{$element}%i", |
40 | - function ($matches) { |
|
40 | + function($matches) { |
|
41 | 41 | return htmlentities($matches[0]); |
42 | 42 | }, |
43 | 43 | $input |