Test Setup Failed
Pull Request — master (#190)
by
unknown
17:12
created
src/midcom/datamanager/validation/photoValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 {
13 13
     public function validate($value, Constraint $constraint)
14 14
     {
15
-        if (   empty($value['archival'])
15
+        if (empty($value['archival'])
16 16
             && empty($value['file'])) {
17 17
             $this->context->buildViolation($constraint->message)
18 18
                 ->addViolation();
Please login to merge, or discard this patch.
src/openpsa/createphp/dba2rdfMapper.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,8 @@
 block discarded – undo
58 58
 
59 59
         try {
60 60
             return midcom::get()->dbfactory->get_object_by_guid($identifier);
61
-        } catch (midcom_error $e) {
61
+        }
62
+        catch (midcom_error $e) {
62 63
             $e->log();
63 64
             return false;
64 65
         }
Please login to merge, or discard this patch.
lib/org/openpsa/mail/exec/test-html.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 midcom::get()->auth->require_admin_user();
3 3
 
4
-if (   empty($_POST['to'])
4
+if (empty($_POST['to'])
5 5
     || empty($_POST['from'])) {
6 6
     ?>
7 7
     <h2>Send test email</h2>
Please login to merge, or discard this patch.
lib/org/openpsa/sales/validator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         if ($result === true) {
21 21
             $result = array();
22 22
         }
23
-        if (   (   empty($fields['end_date'])
23
+        if ((empty($fields['end_date'])
24 24
                 || $fields['end_date'] == '0000-00-00')
25 25
             && empty($fields['continuous'])) {
26 26
             $result['end'] = midcom::get()->i18n->get_string('select either end date or continuous', 'org.openpsa.sales');
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function validate_units(array $fields)
35 35
     {
36 36
         $result = array();
37
-        if (   empty($fields['invoiceByActualUnits'])
37
+        if (empty($fields['invoiceByActualUnits'])
38 38
             && empty($fields['plannedUnits'])) {
39 39
             $result['plannedUnits'] = midcom::get()->i18n->get_string('select either planned units or invoice by actual units', 'org.openpsa.sales');
40 40
             return $result;
Please login to merge, or discard this patch.
lib/org/openpsa/user/handler/group/create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         $this->_group = new midcom_db_group();
43 43
         if (!$this->_group->create()) {
44 44
             debug_print_r('We operated on this object:', $this->_group);
45
-            throw new midcom_error('Failed to create a new group. Last Midgard error was: '. midcom_connection::get_error_string());
45
+            throw new midcom_error('Failed to create a new group. Last Midgard error was: ' . midcom_connection::get_error_string());
46 46
         }
47 47
 
48 48
         return $this->_group;
Please login to merge, or discard this patch.
lib/org/openpsa/widgets/grid/main.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         if (file_exists(MIDCOM_STATIC_ROOT . $jqgrid_path . 'i18n/grid.locale-' . $language . '.js')) {
105 105
             $lang = $language;
106 106
         }
107
-        $head->add_jsfile(MIDCOM_STATIC_URL . $jqgrid_path . 'i18n/grid.locale-'. $lang . '.js');
107
+        $head->add_jsfile(MIDCOM_STATIC_URL . $jqgrid_path . 'i18n/grid.locale-' . $lang . '.js');
108 108
         $head->add_jsfile(MIDCOM_STATIC_URL . $jqgrid_path . 'jquery.jqgrid.min.js');
109 109
 
110 110
         org_openpsa_widgets_ui::add_head_elements();
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     public function set_option($key, $value, $autoquote_string = true)
160 160
     {
161 161
         $this->_raw_options[$key] = $value;
162
-        if (   $autoquote_string
162
+        if ($autoquote_string
163 163
             && is_string($value)) {
164 164
             $value = '"' . str_replace('"', '\\"', $value) . '"';
165 165
         } elseif ($value === true) {
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     public function set_select_column($name, $label, $options, array $selectdata)
193 193
     {
194 194
         $selectstring = implode(';', array_map(
195
-            function ($key, $value) {
195
+            function($key, $value) {
196 196
                 return $key . ':' . $value;
197 197
             },
198 198
             array_keys($selectdata),
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      */
244 244
     public function remove_column($name)
245 245
     {
246
-        if (   empty($name)
246
+        if (empty($name)
247 247
             || !array_key_exists($name, $this->_columns)) {
248 248
             throw new midcom_error('Invalid column name ' . $name);
249 249
         }
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/invoice.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -275,11 +275,11 @@
 block discarded – undo
275 275
             $deliverable = null;
276 276
             foreach (array_keys($mc_task_key) as $key) {
277 277
                 try {
278
-                    $deliverable = new org_openpsa_sales_salesproject_deliverable_dba((int)$mc_task_agreement->get_subkey($key, 'agreement'));
278
+                    $deliverable = new org_openpsa_sales_salesproject_deliverable_dba((int) $mc_task_agreement->get_subkey($key, 'agreement'));
279 279
                     $invoice_item->pricePerUnit = $deliverable->pricePerUnit;
280 280
                     $invoice_item->deliverable = $deliverable->id;
281 281
                     //calculate price
282
-                    if (   $deliverable->invoiceByActualUnits
282
+                    if ($deliverable->invoiceByActualUnits
283 283
                         || $deliverable->plannedUnits == 0) {
284 284
                         $invoice_item->units = $hours;
285 285
                     } else {
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -128,7 +128,8 @@  discard block
 block discarded – undo
128 128
             try {
129 129
                 $task = new org_openpsa_projects_task_dba($id);
130 130
                 $task->update_cache();
131
-            } catch (midcom_error $e) {
131
+            }
132
+            catch (midcom_error $e) {
132 133
             }
133 134
         }
134 135
 
@@ -258,7 +259,8 @@  discard block
 block discarded – undo
258 259
                     } else {
259 260
                         $invoice_item->units = $deliverable->plannedUnits;
260 261
                     }
261
-                } catch (midcom_error $e) {
262
+                }
263
+                catch (midcom_error $e) {
262 264
                     $e->log();
263 265
                     $invoice_item->units = $hours;
264 266
                 }
@@ -310,14 +312,16 @@  discard block
 block discarded – undo
310 312
         if (!empty($this->customer)) {
311 313
             try {
312 314
                 return org_openpsa_contacts_group_dba::get_cached($this->customer);
313
-            } catch (midcom_error $e) {
315
+            }
316
+            catch (midcom_error $e) {
314 317
                 $e->log();
315 318
             }
316 319
         }
317 320
         if (!empty($this->customerContact)) {
318 321
             try {
319 322
                 return org_openpsa_contacts_person_dba::get_cached($this->customerContact);
320
-            } catch (midcom_error $e) {
323
+            }
324
+            catch (midcom_error $e) {
321 325
                 $e->log();
322 326
             }
323 327
         }
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/billing/data.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     public static function get_by_object(org_openpsa_invoices_interfaces_customer $object)
42 42
     {
43 43
         if (   !($bd = self::get_billing_data('org_openpsa_contacts_group_dba', $object->customer))
44
-               // check if the customerContact is set and has invoice_data
44
+                // check if the customerContact is set and has invoice_data
45 45
             && !($bd = self::get_billing_data('org_openpsa_contacts_person_dba', $object->customerContact))) {
46 46
             $bd = new org_openpsa_invoices_billing_data_dba();
47 47
             $due = midcom_baseclasses_components_configuration::get('org.openpsa.invoices', 'config')->get('default_due_days');
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     public static function get_by_object(org_openpsa_invoices_interfaces_customer $object)
42 42
     {
43
-        if (   !($bd = self::get_billing_data('org_openpsa_contacts_group_dba', $object->customer))
43
+        if (!($bd = self::get_billing_data('org_openpsa_contacts_group_dba', $object->customer))
44 44
                // check if the customerContact is set and has invoice_data
45 45
             && !($bd = self::get_billing_data('org_openpsa_contacts_person_dba', $object->customerContact))) {
46 46
             $bd = new org_openpsa_invoices_billing_data_dba();
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,7 +77,8 @@  discard block
 block discarded – undo
77 77
             // if the property useContactAddress is set
78 78
             $billing_data[0]->set_address();
79 79
             return $billing_data[0];
80
-        } catch (midcom_error $e) {
80
+        }
81
+        catch (midcom_error $e) {
81 82
             $e->log();
82 83
             return false;
83 84
         }
@@ -122,10 +123,12 @@  discard block
 block discarded – undo
122 123
     {
123 124
         try {
124 125
             return new org_openpsa_contacts_person_dba($this->linkGuid);
125
-        } catch (midcom_error $e) {
126
+        }
127
+        catch (midcom_error $e) {
126 128
             try {
127 129
                 return new org_openpsa_contacts_group_dba($this->linkGuid);
128
-            } catch (midcom_error $e) {
130
+            }
131
+            catch (midcom_error $e) {
129 132
                 debug_add("Failed to load contact with GUID: " . $this->linkGuid . " - last error:" . $e->getMessage(), MIDCOM_LOG_ERROR);
130 133
                 return false;
131 134
             }
Please login to merge, or discard this patch.
lib/org/openpsa/sales/handler/view.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             );
84 84
         }
85 85
 
86
-        if (   $this->_config->get('sales_pdfbuilder_class')
86
+        if ($this->_config->get('sales_pdfbuilder_class')
87 87
             && $this->_salesproject->can_do('midgard:update')
88 88
             && $this->is_pdf_creatable()) {
89 89
             $workflow = $this->get_workflow('datamanager2');
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $this->_request_data['schemadb_salesproject_deliverable'] = midcom_helper_datamanager2_schema::load_database($this->_config->get('schemadb_deliverable'));
124 124
 
125 125
         $this->_request_data['controller'] = midcom_helper_datamanager2_controller::create('ajax');
126
-        $this->_request_data['controller']->schemadb =& $this->_request_data['schemadb_salesproject'];
126
+        $this->_request_data['controller']->schemadb = & $this->_request_data['schemadb_salesproject'];
127 127
         $this->_request_data['controller']->set_storage($this->_salesproject);
128 128
         $this->_request_data['controller']->process_ajax();
129 129
     }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         $this->_request_data['deliverables_objects'] = array();
180 180
         foreach ($deliverables as $deliverable) {
181 181
             $this->_controllers[$deliverable->id] = midcom_helper_datamanager2_controller::create('ajax');
182
-            $this->_controllers[$deliverable->id]->schemadb =& $this->_request_data['schemadb_salesproject_deliverable'];
182
+            $this->_controllers[$deliverable->id]->schemadb = & $this->_request_data['schemadb_salesproject_deliverable'];
183 183
             $this->_controllers[$deliverable->id]->set_storage($deliverable);
184 184
             $this->_controllers[$deliverable->id]->process_ajax();
185 185
             $this->_request_data['deliverables_objects'][$deliverable->guid] = $deliverable;
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             if ($deliverable->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION) {
229 229
                 if ($entries = $deliverable->get_at_entries()) {
230 230
                     $toolbar['label'] = sprintf($this->_l10n->get('next invoice will be generated on %s'), $formatter->date($entries[0]->start));
231
-                    if (   $entries[0]->status == midcom_services_at_entry_dba::SCHEDULED
231
+                    if ($entries[0]->status == midcom_services_at_entry_dba::SCHEDULED
232 232
                         && midcom::get()->auth->can_user_do('midgard:create', null, 'org_openpsa_invoices_invoice_dba')) {
233 233
                         $toolbar['buttons']['run_cycle'] = $this->_l10n->get('generate now');
234 234
                     }
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
             if ($deliverable->invoiced > 0) {
242 242
                 $toolbar['label'] = $this->_l10n->get('invoiced') . ': ' . $formatter->number($deliverable->invoiced);
243 243
             }
244
-        } elseif (   $deliverable->orgOpenpsaObtype != org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
244
+        } elseif ($deliverable->orgOpenpsaObtype != org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
245 245
                  && midcom::get()->auth->can_user_do('midgard:create', null, 'org_openpsa_invoices_invoice_dba')) {
246 246
             //not invoiced yet
247 247
             $client_class = $this->_config->get('calculator');
Please login to merge, or discard this patch.