@@ -133,7 +133,7 @@ |
||
133 | 133 | return new midcom_response_relocate($relocate); |
134 | 134 | } |
135 | 135 | |
136 | - private function parse_input(ParameterBag $input, string $action) : int|bool |
|
136 | + private function parse_input(ParameterBag $input, string $action) : int | bool |
|
137 | 137 | { |
138 | 138 | if (!in_array($action, ['invoiceable', 'invoice', 'task'])) { |
139 | 139 | throw new midcom_error('passed action ' . $action . ' is unknown'); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | |
139 | 139 | if ($contacts = $importer->parse($input)) { |
140 | 140 | $this->_request_data['import_status'] = $importer->import_subscribers($contacts, $this->_request_data['campaign']); |
141 | - if ( $this->_request_data['import_status']['subscribed_new'] > 0 |
|
141 | + if ($this->_request_data['import_status']['subscribed_new'] > 0 |
|
142 | 142 | || $this->_request_data['import_status']['already_subscribed'] > 0) { |
143 | 143 | $this->_import_success = true; |
144 | 144 | } |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | $read_rows = 0; |
196 | 196 | $handle = fopen($data['tmp_file'], 'r'); |
197 | 197 | $total_columns = 0; |
198 | - while ( $read_rows < 2 |
|
198 | + while ($read_rows < 2 |
|
199 | 199 | && $csv_line = fgetcsv($handle, 1000, $data['separator'])) { |
200 | 200 | if ($total_columns == 0) { |
201 | 201 | $total_columns = count($csv_line); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | { |
18 | 18 | $result = $this->validate_units($fields); |
19 | 19 | |
20 | - if ( empty($fields['end']) |
|
20 | + if (empty($fields['end']) |
|
21 | 21 | && empty($fields['continuous'])) { |
22 | 22 | if ($result === true) { |
23 | 23 | $result = []; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | public function validate_units(array $fields) |
31 | 31 | { |
32 | - if ( empty($fields['invoiceByActualUnits']) |
|
32 | + if (empty($fields['invoiceByActualUnits']) |
|
33 | 33 | && empty($fields['plannedUnits'])) { |
34 | 34 | return [ |
35 | 35 | 'plannedUnits' => midcom::get()->i18n->get_string('select either planned units or invoice by actual units', 'org.openpsa.sales') |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $schema->get_field('next_cycle')['hidden'] = false; |
38 | 38 | $schema->get_field('next_cycle')['default'] = $entry->start; |
39 | 39 | $schema->get_field('at_entry')['default'] = $entry->id; |
40 | - } elseif ( ($this->_deliverable->continuous || $this->_deliverable->end > time()) |
|
40 | + } elseif (($this->_deliverable->continuous || $this->_deliverable->end > time()) |
|
41 | 41 | && $this->_deliverable->state == org_openpsa_sales_salesproject_deliverable_dba::STATE_STARTED) { |
42 | 42 | $schema->get_field('next_cycle')['hidden'] = false; |
43 | 43 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $message['title'] = sprintf($this->_l10n->get('comment %s reported as abuse'), $comment->title); |
54 | 54 | $message['content'] = ''; |
55 | 55 | if ($logs = $comment->get_logs()) { |
56 | - $message['content'] .= $this->_l10n->get('moderation history').":\n\n"; |
|
56 | + $message['content'] .= $this->_l10n->get('moderation history') . ":\n\n"; |
|
57 | 57 | foreach ($logs as $time => $log) { |
58 | 58 | $reported = $this->_l10n->get_formatter()->datetime(strtotime("{$time}Z")); |
59 | 59 | $message['content'] .= $this->_l10n->get(sprintf('%s: %s by %s (from %s)', "$reported:\n", $this->_l10n->get($log['action']), $log['reporter'], $log['ip'])) . "\n\n"; |