Test Setup Failed
Pull Request — master (#190)
by
unknown
09:44
created
lib/org/openpsa/projects/handler/task/resourcing.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $this->_task = new org_openpsa_projects_task_dba($args[0]);
59 59
         $this->_task->require_do('midgard:create');
60 60
 
61
-        if (   array_key_exists('org_openpsa_projects_prospects', $_POST)
61
+        if (array_key_exists('org_openpsa_projects_prospects', $_POST)
62 62
             && $_POST['save']) {
63 63
             $qb = org_openpsa_projects_task_resource_dba::new_query_builder();
64 64
             $qb->add_constraint('guid', 'IN', array_keys($_POST['org_openpsa_projects_prospects']));
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                     // create relatedto
90 90
                     org_openpsa_relatedto_plugin::create($event, 'org.openpsa.calendar', $this->_task, 'org.openpsa.projects');
91 91
                 }
92
-                if (   $update_prospect
92
+                if ($update_prospect
93 93
                     && !$prospect->update()) {
94 94
                     debug_add('Failed to update prospect: ' . midcom_connection::get_error_string(), MIDCOM_LOG_ERROR);
95 95
                 }
Please login to merge, or discard this patch.
lib/org/openpsa/projects/task/status.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
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/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 1 patch
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.
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 1 patch
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.
lib/org/openpsa/sales/handler/edit.php 1 patch
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.