Test Failed
Branch master (8d1702)
by Andreas
11:03
created
lib/org/openpsa/contacts/handler/search.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
         // Handle automatic wildcards
82 82
         $auto_wildcards = $this->_config->get('auto_wildcards');
83
-        if (   $auto_wildcards
83
+        if ($auto_wildcards
84 84
             && strpos($this->_query_string_processed, '%') === false) {
85 85
             switch ($auto_wildcards) {
86 86
                 case 'both':
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function _show_search_type($handler_id, array &$data)
129 129
     {
130
-        if (   $this->_view == 'foaf'
130
+        if ($this->_view == 'foaf'
131 131
             && sizeof($this->_persons) > 0) {
132 132
             midcom_show_style('foaf-header');
133 133
             foreach ($this->_persons as $person) {
@@ -159,11 +159,11 @@  discard block
 block discarded – undo
159 159
             return $this->_prepare_json_reply();
160 160
         }
161 161
 
162
-        if (   count($this->_groups) == 1
162
+        if (count($this->_groups) == 1
163 163
             && count($this->_persons) == 0) {
164 164
             return new midcom_response_relocate('group/' . $this->_groups[0]->guid . '/');
165 165
         }
166
-        if (   count($this->_groups) == 0
166
+        if (count($this->_groups) == 0
167 167
             && count($this->_persons) == 1) {
168 168
             return new midcom_response_relocate('person/' . $this->_persons[0]->guid . '/');
169 169
         }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
         midcom_show_style('search-header');
240 240
 
241
-        if (   count($this->_groups) == 0
241
+        if (count($this->_groups) == 0
242 242
             && count($this->_persons) == 0
243 243
             && $this->_query_string) {
244 244
             //No results at all (from any of the queries)
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/person.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function __construct($identifier = null)
24 24
     {
25
-        if (   midcom::get()->config->get('person_class') != 'midgard_person'
25
+        if (midcom::get()->config->get('person_class') != 'midgard_person'
26 26
             && midcom::get()->config->get('person_class') != 'openpsa_person') {
27 27
             $this->__mgdschema_class_name__ = midcom::get()->config->get('person_class');
28 28
         }
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function __set($name, $value)
33 33
     {
34
-        if (   $name == 'homepage'
34
+        if ($name == 'homepage'
35 35
             && !empty($value)
36 36
             && $value != $this->homepage) {
37 37
             $this->_url_changed = true;
Please login to merge, or discard this patch.
lib/org/openpsa/qbpager/main.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,16 +61,16 @@  discard block
 block discarded – undo
61 61
     private function _check_page_vars()
62 62
     {
63 63
         $page_var = $this->_prefix . 'page';
64
-        $results_var =  $this->_prefix . 'results';
64
+        $results_var = $this->_prefix . 'results';
65 65
         if (!empty($_REQUEST[$page_var])) {
66 66
             debug_add("{$page_var} has value: {$_REQUEST[$page_var]}");
67
-            $this->_current_page = (int)$_REQUEST[$page_var];
67
+            $this->_current_page = (int) $_REQUEST[$page_var];
68 68
         }
69 69
         if (!empty($_REQUEST[$results_var])) {
70 70
             debug_add("{$results_var} has value: {$_REQUEST[$results_var]}");
71
-            $this->results_per_page = (int)$_REQUEST[$results_var];
71
+            $this->results_per_page = (int) $_REQUEST[$results_var];
72 72
         }
73
-        $this->_offset = ($this->_current_page-1)*$this->results_per_page;
73
+        $this->_offset = ($this->_current_page - 1) * $this->results_per_page;
74 74
         if ($this->_offset < 0) {
75 75
             $this->_offset = 0;
76 76
         }
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
         return $this->_midcom_qb->add_constraint($param, $op, $val);
293 293
     }
294 294
 
295
-    public function add_order($param, $sort='ASC')
295
+    public function add_order($param, $sort = 'ASC')
296 296
     {
297 297
         if (!$this->_sanity_check()) {
298 298
             return false;
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
         if (!$this->_sanity_check()) {
330 330
             return false;
331 331
         }
332
-        if (   !$this->count
332
+        if (!$this->count
333 333
             || $this->_count_mode != 'count') {
334 334
             $this->count = $this->_midcom_qb_count->count();
335 335
         }
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
         if (!$this->_sanity_check()) {
343 343
             return false;
344 344
         }
345
-        if (   !$this->count
345
+        if (!$this->count
346 346
             || $this->_count_mode != 'count_unchecked') {
347 347
             $this->count = $this->_midcom_qb_count->count_unchecked();
348 348
         }
Please login to merge, or discard this patch.
lib/org/openpsa/user/widget/password.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         $elements = array();
28 28
         $attributes = array_merge($attributes, array('class' => 'shorttext', 'id' => $this->name . '_input'));
29 29
 
30
-        $menu ='<label><input type="radio" name="org_openpsa_user_person_account_password_switch" value="0" checked="checked"/> ' . $this->_l10n->get("generate_password") . '
30
+        $menu = '<label><input type="radio" name="org_openpsa_user_person_account_password_switch" value="0" checked="checked"/> ' . $this->_l10n->get("generate_password") . '
31 31
             </label>
32 32
             <label>
33 33
                 <input type="radio" name="org_openpsa_user_person_account_password_switch" value="1"/> ' . $this->_l10n->get("own_password") . '
Please login to merge, or discard this patch.
lib/org/openpsa/user/handler/person/view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $this->add_breadcrumb('', $this->_person->get_label());
44 44
 
45 45
         $auth = midcom::get()->auth;
46
-        if (   $this->_person->id == midcom_connection::get_user()
46
+        if ($this->_person->id == midcom_connection::get_user()
47 47
             || $auth->can_user_do('org.openpsa.user:manage', null, 'org_openpsa_user_interface')) {
48 48
             $buttons = array();
49 49
             $workflow = $this->get_workflow('datamanager2');
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                 $delete_workflow = $this->get_workflow('delete', array('object' => $this->_person));
57 57
                 $buttons[] = $delete_workflow->get_button("delete/{$this->_person->guid}/");
58 58
             }
59
-            if (   midcom_connection::is_user($this->_person)
59
+            if (midcom_connection::is_user($this->_person)
60 60
                 && $this->_person->can_do('midgard:privileges')) {
61 61
                 $buttons[] = $workflow->get_button("privileges/{$this->_person->guid}/", array(
62 62
                     MIDCOM_TOOLBAR_LABEL => $this->_l10n->get("permissions"),
Please login to merge, or discard this patch.
lib/org/openpsa/user/midcom/interfaces.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,8 @@  discard block
 block discarded – undo
25 25
         midcom::get()->auth->request_sudo($this->_component);
26 26
         try {
27 27
             $person = new midcom_db_person($args['guid']);
28
-        } catch (midcom_error $e) {
28
+        }
29
+        catch (midcom_error $e) {
29 30
             $handler->print_error('Person with guid #' . $args['guid'] . ' does not exist');
30 31
             midcom::get()->auth->drop_sudo();
31 32
             return false;
@@ -33,7 +34,8 @@  discard block
 block discarded – undo
33 34
         $accounthelper = new org_openpsa_user_accounthelper($person);
34 35
         try {
35 36
             $accounthelper->reopen_account();
36
-        } catch (midcom_error $e) {
37
+        }
38
+        catch (midcom_error $e) {
37 39
             $handler->print_error($e->getMessage());
38 40
             midcom::get()->auth->drop_sudo();
39 41
             return false;
Please login to merge, or discard this patch.
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 2 patches
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.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,8 @@
 block discarded – undo
91 91
                 if ($recipient->guid == $this->metadata->creator) {
92 92
                     return org_openpsa_projects_workflow::accept($task, 0, $this->comment);
93 93
                 }
94
-            } catch (midcom_error $e) {
94
+            }
95
+            catch (midcom_error $e) {
95 96
                 $e->log();
96 97
             }
97 98
         }
Please login to merge, or discard this patch.
lib/org/openpsa/projects/hour/report.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,8 @@
 block discarded – undo
69 69
         try {
70 70
             $parent = new org_openpsa_projects_task_dba($this->task);
71 71
             $parent->update_cache();
72
-        } catch (midcom_error $e) {
72
+        }
73
+        catch (midcom_error $e) {
73 74
             return false;
74 75
         }
75 76
         if ($start) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
     {
91 91
         if ($this->invoiceable) {
92 92
             $task = new org_openpsa_projects_task_dba($this->task);
93
-            $time_slot = (float)$task->get_parameter('org.openpsa.projects.projectbroker', 'minimum_slot');
93
+            $time_slot = (float) $task->get_parameter('org.openpsa.projects.projectbroker', 'minimum_slot');
94 94
             if (empty($time_slot)) {
95 95
                 $time_slot = (float) midcom_baseclasses_components_configuration::get('org.openpsa.projects', 'config')->get('default_minimum_time_slot');
96 96
                 if (empty($time_slot)) {
Please login to merge, or discard this patch.