Test Failed
Branch master (8d1702)
by Andreas
11:03
created
lib/org/openpsa/projects/project.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/org/openpsa/projects/projectbroker.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,8 @@
 block discarded – undo
44 44
             if (!$obj instanceof org_openpsa_contacts_person_dba) {
45 45
                 try {
46 46
                     $obj = new org_openpsa_contacts_person_dba($obj->id);
47
-                } catch (midcom_error $e) {
47
+                }
48
+                catch (midcom_error $e) {
48 49
                     $e->log();
49 50
                     continue;
50 51
                 }
Please login to merge, or discard this patch.
lib/org/openpsa/projects/status.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
lib/org/openpsa/mypage/handler/workingon.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
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/");
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,8 @@
 block discarded – undo
92 92
                         $customer = new org_openpsa_contacts_group_dba($customer_id);
93 93
                         $customer_label = $customer->official;
94 94
                         $customer = $customer_id;
95
-                    } catch (midcom_error $e) {
95
+                    }
96
+                    catch (midcom_error $e) {
96 97
                     }
97 98
                 }
98 99
             }
Please login to merge, or discard this patch.
lib/org/openpsa/sales/salesproject/deliverable.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
lib/org/openpsa/sales/handler/deliverable/admin.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $this->_load_schemadb();
55 55
         $this->_modify_schema();
56 56
         $controller = midcom_helper_datamanager2_controller::create('simple');
57
-        $controller->schemadb =& $this->_schemadb;
57
+        $controller->schemadb = & $this->_schemadb;
58 58
         $controller->set_storage($this->_deliverable, $this->_schema);
59 59
         if (!$controller->initialize()) {
60 60
             throw new midcom_error("Failed to initialize a DM2 controller instance for deliverable {$this->_deliverable->id}.");
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     private function _modify_schema()
69 69
     {
70
-        $fields =& $this->_schemadb['subscription']->fields;
70
+        $fields = & $this->_schemadb['subscription']->fields;
71 71
 
72 72
         $mc = new org_openpsa_relatedto_collector($this->_deliverable->guid, 'midcom_services_at_entry_dba');
73 73
         $mc->add_object_order('start', 'ASC');
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $at_entries = $mc->get_related_objects();
76 76
 
77 77
         if (sizeof($at_entries) != 1) {
78
-            if (   (   $this->_deliverable->continuous
78
+            if (($this->_deliverable->continuous
79 79
                     || $this->_deliverable->end > time())
80 80
                 && $this->_deliverable->state == org_openpsa_sales_salesproject_deliverable_dba::STATE_STARTED) {
81 81
                 $fields['next_cycle']['hidden'] = false;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         if (!empty($formdata['at_entry']->value)) {
129 129
             $entry = new midcom_services_at_entry_dba((int) $formdata['at_entry']->value);
130 130
         }
131
-        if (   isset($formdata['next_cycle'])
131
+        if (isset($formdata['next_cycle'])
132 132
             && !$formdata['next_cycle']->is_empty()) {
133 133
             $next_cycle = (int) $formdata['next_cycle']->value->format('U');
134 134
         }
Please login to merge, or discard this patch.
lib/org/openpsa/sales/handler/deliverable/view.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         $this->_load_schema();
78 78
 
79 79
         $this->_request_data['controller'] = midcom_helper_datamanager2_controller::create('ajax');
80
-        $this->_request_data['controller']->schemadb =& $this->_request_data['schemadb_salesproject_deliverable'];
80
+        $this->_request_data['controller']->schemadb = & $this->_request_data['schemadb_salesproject_deliverable'];
81 81
         $this->_request_data['controller']->set_storage($this->_deliverable);
82 82
         $this->_request_data['controller']->process_ajax();
83 83
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,8 @@
 block discarded – undo
51 51
         }
52 52
         try {
53 53
             $this->_request_data['product'] = org_openpsa_products_product_dba::get_cached($this->_deliverable->product);
54
-        } catch (midcom_error $e) {
54
+        }
55
+        catch (midcom_error $e) {
55 56
             $this->_request_data['product'] = false;
56 57
         }
57 58
     }
Please login to merge, or discard this patch.
lib/org/openpsa/sales/handler/edit.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     {
56 56
         $this->_load_schemadb();
57 57
         $this->_controller = midcom_helper_datamanager2_controller::create('simple');
58
-        $this->_controller->schemadb =& $this->_schemadb;
58
+        $this->_controller->schemadb = & $this->_schemadb;
59 59
         $this->_controller->set_storage($this->_salesproject, $this->_schema);
60 60
         if (!$this->_controller->initialize()) {
61 61
             throw new midcom_error("Failed to initialize a DM2 controller instance for salesproject {$this->_salesproject->id}.");
@@ -71,9 +71,9 @@  discard block
 block discarded – undo
71 71
         $this->_load_defaults($args);
72 72
 
73 73
         $this->_controller = midcom_helper_datamanager2_controller::create('create');
74
-        $this->_controller->schemadb =& $this->_schemadb;
74
+        $this->_controller->schemadb = & $this->_schemadb;
75 75
         $this->_controller->schemaname = $this->_schema;
76
-        $this->_controller->callback_object =& $this;
76
+        $this->_controller->callback_object = & $this;
77 77
         $this->_controller->defaults = $this->_defaults;
78 78
         if (!$this->_controller->initialize()) {
79 79
             throw new midcom_error("Failed to initialize a DM2 create controller.");
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     {
85 85
         $schemadb = midcom_helper_datamanager2_schema::load_database($this->_config->get('schemadb_salesproject'));
86 86
         if ($this->_salesproject) {
87
-            $fields =& $schemadb['default']->fields;
87
+            $fields = & $schemadb['default']->fields;
88 88
             $fields['customer']['type_config']['options'] = org_openpsa_helpers_list::task_groups($this->_salesproject);
89 89
         }
90 90
         $this->_schemadb = $schemadb;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $this->_defaults['owner'] = midcom_connection::get_user();
97 97
 
98 98
         if (!empty($args[0])) {
99
-            $fields =& $this->_schemadb['default']->fields;
99
+            $fields = & $this->_schemadb['default']->fields;
100 100
             try {
101 101
                 $customer = new org_openpsa_contacts_group_dba($args[0]);
102 102
                 $fields['customer']['type_config']['options'] = array(0 => '', $customer->id => $customer->official);
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,8 @@
 block discarded – undo
102 102
                 $fields['customer']['type_config']['options'] = array(0 => '', $customer->id => $customer->official);
103 103
 
104 104
                 $this->_defaults['customer'] = $customer->id;
105
-            } catch (midcom_error $e) {
105
+            }
106
+            catch (midcom_error $e) {
106 107
                 $customer = new org_openpsa_contacts_person_dba($args[0]);
107 108
                 $this->_defaults['customerContact'] = $customer->id;
108 109
                 $fields['customer']['type_config']['options'] = org_openpsa_helpers_list::task_groups(new org_openpsa_sales_salesproject_dba, 'id', array($customer->id => true));
Please login to merge, or discard this patch.
lib/org/openpsa/sales/midcom/interfaces.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -134,7 +134,8 @@  discard block
 block discarded – undo
134 134
 
135 135
         try {
136 136
             $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($args['deliverable']);
137
-        } catch (midcom_error $e) {
137
+        }
138
+        catch (midcom_error $e) {
138 139
             $handler->print_error("Deliverable {$args['deliverable']} not found: " . midcom_connection::get_error_string());
139 140
             return false;
140 141
         }
@@ -158,7 +159,8 @@  discard block
 block discarded – undo
158 159
         }
159 160
         try {
160 161
             $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($args['deliverable']);
161
-        } catch (midcom_error $e) {
162
+        }
163
+        catch (midcom_error $e) {
162 164
             $handler->print_error('no deliverable with passed GUID: ' . $args['deliverable'] . ', aborting');
163 165
             return false;
164 166
         }
@@ -166,7 +168,8 @@  discard block
 block discarded – undo
166 168
         //get the owner of the salesproject the deliverable belongs to
167 169
         try {
168 170
             $project = new org_openpsa_sales_salesproject_dba($deliverable->salesproject);
169
-        } catch (midcom_error $e) {
171
+        }
172
+        catch (midcom_error $e) {
170 173
             $handler->print_error('Failed to load salesproject: ' . $e->getMessage());
171 174
             return false;
172 175
         }
Please login to merge, or discard this patch.