Test Failed
Branch master (8d1702)
by Andreas
11:03
created
lib/org/openpsa/contacts/handler/person/view.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $invoices_url = $siteconfig->get_node_full_url('org.openpsa.invoices');
111 111
         $user_url = $siteconfig->get_node_full_url('org.openpsa.user');
112 112
 
113
-        if (   $invoices_url
113
+        if ($invoices_url
114 114
             && midcom::get()->auth->can_user_do('midgard:create', null, 'org_openpsa_invoices_invoice_dba')
115 115
             && $this->_contact->can_do('midgard:update')) {
116 116
             $buttons[] = $workflow->get_button($invoices_url . "billingdata/" . $this->_contact->guid . '/', array(
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
             ));
119 119
         }
120 120
 
121
-        if (   $user_url
122
-            && (   midcom_connection::get_user() == $this->_contact->id
121
+        if ($user_url
122
+            && (midcom_connection::get_user() == $this->_contact->id
123 123
                 || midcom::get()->auth->can_user_do('org.openpsa.user:access', null, 'org_openpsa_user_interface'))) {
124 124
             $buttons[] = array(
125 125
                 MIDCOM_TOOLBAR_URL => $user_url . "view/{$this->_contact->guid}/",
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
      */
198 198
     public function _show_group_memberships($handler_id, array &$data)
199 199
     {
200
-        if (   count($data['organizations']) == 0
200
+        if (count($data['organizations']) == 0
201 201
             && count($data['groups']) == 0) {
202 202
             midcom_show_style('show-person-groups-empty');
203 203
         } else {
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -216,7 +216,8 @@
 block discarded – undo
216 216
         foreach ($this->_request_data[$identifier] as $member) {
217 217
             try {
218 218
                 $this->_request_data['group'] = org_openpsa_contacts_group_dba::get_cached($member->gid);
219
-            } catch (midcom_error $e) {
219
+            }
220
+            catch (midcom_error $e) {
220 221
                 $e->log();
221 222
                 continue;
222 223
             }
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/handler/person/admin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
     {
60 60
         $this->_load_schemadb();
61 61
         $this->_controller = midcom_helper_datamanager2_controller::create('simple');
62
-        $this->_controller->schemadb =& $this->_schemadb;
62
+        $this->_controller->schemadb = & $this->_schemadb;
63 63
         $this->_controller->set_storage($this->_contact, $this->_schema);
64 64
         if (!$this->_controller->initialize()) {
65 65
             throw new midcom_error("Failed to initialize a DM2 controller instance for contact {$this->_contact->id}.");
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/handler/group/view.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
             );
59 59
         }
60 60
 
61
-        if (   midcom::get()->auth->can_user_do('midgard:create', null, 'org_openpsa_contacts_person_dba')
61
+        if (midcom::get()->auth->can_user_do('midgard:create', null, 'org_openpsa_contacts_person_dba')
62 62
             && $this->group->can_do('midgard:create')) {
63 63
             $buttons[] = $workflow->get_button("person/create/{$this->group->guid}/", array(
64 64
                 MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('create person'),
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
         $siteconfig = org_openpsa_core_siteconfig::get_instance();
70 70
         $user_url = $siteconfig->get_node_full_url('org.openpsa.user');
71
-        if (   $user_url
71
+        if ($user_url
72 72
             && midcom::get()->auth->can_user_do('org.openpsa.user:access', null, 'org_openpsa_user_interface')) {
73 73
             $buttons[] = array(
74 74
                 MIDCOM_TOOLBAR_URL => $user_url . "group/{$this->group->guid}/",
Please login to merge, or discard this patch.
lib/org/openpsa/reports/handler/base.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function _handler_generator_get($handler_id, array $args, array &$data)
43 43
     {
44 44
         midcom::get()->auth->require_valid_user();
45
-        if (   !array_key_exists('org_openpsa_reports_query_data', $_REQUEST)
45
+        if (!array_key_exists('org_openpsa_reports_query_data', $_REQUEST)
46 46
             || !is_array($_REQUEST['org_openpsa_reports_query_data'])) {
47 47
             throw new midcom_error('query data not present or invalid');
48 48
         }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     private function _load_edit_controller()
90 90
     {
91 91
         $this->_controller = midcom_helper_datamanager2_controller::create('simple');
92
-        $this->_controller->schemadb =& $this->_schemadb;
92
+        $this->_controller->schemadb = & $this->_schemadb;
93 93
         $this->_controller->set_storage($this->_request_data['query'], 'default');
94 94
         if (!$this->_controller->initialize()) {
95 95
             throw new midcom_error("Failed to initialize a DM2 controller instance for document {$this->_document->id}.");
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
     {
133 133
         $this->_load_schemadb();
134 134
         $this->_controller = midcom_helper_datamanager2_controller::create('create');
135
-        $this->_controller->schemadb =& $this->_schemadb;
135
+        $this->_controller->schemadb = & $this->_schemadb;
136 136
         $this->_controller->schemaname = 'default';
137
-        $this->_controller->callback_object =& $this;
137
+        $this->_controller->callback_object = & $this;
138 138
         if (!$this->_controller->initialize()) {
139 139
             throw new midcom_error("Failed to initialize a DM2 create controller.");
140 140
         }
@@ -172,9 +172,9 @@  discard block
 block discarded – undo
172 172
         $this->_request_data['datamanager'] = $this->_datamanagers[$this->module];
173 173
 
174 174
         if (isset($data['query'])) {
175
-            $breadcrumb_label =  sprintf($this->_l10n->get('edit report %s'), $data['query']->title);
175
+            $breadcrumb_label = sprintf($this->_l10n->get('edit report %s'), $data['query']->title);
176 176
         } else {
177
-            $breadcrumb_label =  $this->_l10n->get('define custom report');
177
+            $breadcrumb_label = $this->_l10n->get('define custom report');
178 178
         }
179 179
         $this->add_breadcrumb("", $breadcrumb_label);
180 180
     }
Please login to merge, or discard this patch.
lib/org/openpsa/reports/handler/sales/report.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,8 @@
 block discarded – undo
71 71
             $owner = org_openpsa_contacts_person_dba::get_cached($salesproject->owner);
72 72
             $row['index_owner'] = $owner->name;
73 73
             $row['owner'] = org_openpsa_widgets_contact::get($owner->guid)->show_inline();
74
-        } catch (midcom_error $e) {
74
+        }
75
+        catch (midcom_error $e) {
75 76
             $e->log();
76 77
         }
77 78
         $row['amount'] = $object->pricePerUnit * $object->units;
Please login to merge, or discard this patch.
lib/org/openpsa/helpers/list.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,8 @@
 block discarded – undo
69 69
         if (empty(self::$_seen[$company_id])) {
70 70
             try {
71 71
                 $company = new org_openpsa_contacts_group_dba($company_id);
72
-            } catch (midcom_error $e) {
72
+            }
73
+            catch (midcom_error $e) {
73 74
                 return;
74 75
             }
75 76
             self::$_seen[$company->id] = true;
Please login to merge, or discard this patch.
lib/org/openpsa/expenses/handler/csv.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
     public function _load_schemadbs($handler_id, &$args, &$data)
19 19
     {
20
-        if (   isset($_GET['filename'])
20
+        if (isset($_GET['filename'])
21 21
             && is_string($_GET['filename'])
22 22
             && strpos($_GET['filename'], '.csv')) {
23 23
             $data['filename'] = $_GET['filename'];
@@ -28,14 +28,14 @@  discard block
 block discarded – undo
28 28
     public function _load_data($handler_id, &$args, &$data)
29 29
     {
30 30
         midcom::get()->auth->require_valid_user();
31
-        if (   empty($_POST['guids'])
31
+        if (empty($_POST['guids'])
32 32
             || !is_array($_POST['guids'])) {
33 33
             throw new midcom_error("No GUIDs found, aborting.");
34 34
         }
35 35
 
36 36
         $qb = org_openpsa_projects_hour_report_dba::new_query_builder();
37 37
         $qb->add_constraint('guid', 'IN', $_POST['guids']);
38
-        if (   isset($_POST['order'])
38
+        if (isset($_POST['order'])
39 39
             && is_array($_POST['order'])) {
40 40
             foreach ($_POST['order'] as $field => $order) {
41 41
                 $qb->add_order($field, $order);
Please login to merge, or discard this patch.
lib/org/openpsa/core/siteconfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
         }
175 175
         if (!midcom::get()->auth->admin) {
176 176
             $user_id = midcom::get()->auth->acl->get_user_id();
177
-            if (   !$this->data[$type . '_guid']
177
+            if (!$this->data[$type . '_guid']
178 178
                 || !midcom::get()->auth->acl->can_do_byguid('midgard:read', $this->data[$type . '_guid'], 'midcom_db_topic', $user_id)) {
179 179
                 return null;
180 180
             }
Please login to merge, or discard this patch.
lib/org/openpsa/products/midcom/interfaces.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     public function _on_reindex($topic, $config, &$indexer)
52 52
     {
53
-        if (   !$config->get('index_products')
53
+        if (!$config->get('index_products')
54 54
             && !$config->get('index_groups')) {
55 55
             debug_add("No indexing to groups and products, skipping", MIDCOM_LOG_WARN);
56 56
             return true;
Please login to merge, or discard this patch.