Test Failed
Branch master (8d1702)
by Andreas
11:03
created
lib/midgard/admin/user/handler/group/list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
                 midcom::get()->uimessages->add($this->_l10n->get('midgard.admin.user'), $this->_l10n_midcom->get('updated'));
59 59
                 return new midcom_response_relocate("__mfa/asgard_midgard.admin.user/group/edit/{$data['group']->guid}/");
60 60
             }
61
-            debug_add('Failed to update the group, last error was '. midcom_connection::get_error_string(), MIDCOM_LOG_ERROR);
61
+            debug_add('Failed to update the group, last error was ' . midcom_connection::get_error_string(), MIDCOM_LOG_ERROR);
62 62
             debug_print_r('We operated on this object', $data['group'], MIDCOM_LOG_ERROR);
63 63
 
64 64
             throw new midcom_error('Failed to update the group, see error level log for details');
Please login to merge, or discard this patch.
lib/midgard/admin/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/midgard/admin/user/handler/user/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->_person = new midcom_db_person();
43 43
         if (!$this->_person->create()) {
44 44
             debug_print_r('We operated on this object:', $this->_person);
45
-            throw new midcom_error('Failed to create a new person. Last Midgard error was: '. midcom_connection::get_error_string());
45
+            throw new midcom_error('Failed to create a new person. Last Midgard error was: ' . midcom_connection::get_error_string());
46 46
         }
47 47
 
48 48
         return $this->_person;
Please login to merge, or discard this patch.
lib/midgard/admin/user/validator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@
 block discarded – undo
27 27
         if (!empty($fields["username"])) {
28 28
             $user = midcom::get()->auth->get_user_by_name($fields["username"]);
29 29
 
30
-            if (   $user
31
-                && (   !isset($fields['person'])
30
+            if ($user
31
+                && (!isset($fields['person'])
32 32
                     || $user->guid != $fields['person'])) {
33 33
                 $result["username"] = sprintf(midcom::get()->i18n->get_string("username %s is already in use", "midgard.admin.user"), $fields['username']);
34 34
             }
Please login to merge, or discard this patch.
lib/org/openpsa/projects/midcom/indexer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  */
14 14
 class org_openpsa_projects_midcom_indexer extends midcom_helper_datamanager2_indexer_client
15 15
 {
16
-    public function prepare_document(midcom_services_indexer_document &$document, midcom_helper_datamanager2_datamanager $dm)
16
+    public function prepare_document(midcom_services_indexer_document & $document, midcom_helper_datamanager2_datamanager $dm)
17 17
     {
18 18
         $document->title = $dm->storage->object->get_label();
19 19
         if (is_a($dm->storage->object, 'org_openpsa_projects_task_dba')) {
Please login to merge, or discard this patch.
lib/org/openpsa/projects/handler/workflow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
         midcom::get()->auth->require_valid_user();
37 37
         //Look for action among POST variables, then load main handler...
38
-        if (   empty($_POST['org_openpsa_projects_workflow_action'])
38
+        if (empty($_POST['org_openpsa_projects_workflow_action'])
39 39
             || !is_array($_POST['org_openpsa_projects_workflow_action'])) {
40 40
             throw new midcom_error('Incomplete request');
41 41
         }
Please login to merge, or discard this patch.
lib/org/openpsa/projects/handler/task/crud.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function _populate_toolbar($handler_id)
41 41
     {
42
-        if (   $this->_mode == 'read'
42
+        if ($this->_mode == 'read'
43 43
             && $this->_object->can_do('midgard:update')) {
44 44
             $this->_populate_read_toolbar();
45 45
             org_openpsa_widgets_ui::enable_ui_tab();
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             MIDCOM_TOOLBAR_ACCESSKEY => 'e',
80 80
         ));
81 81
 
82
-        if (   $this->_object->reportedHours == 0
82
+        if ($this->_object->reportedHours == 0
83 83
             && $this->_object->can_do('midgard:delete')) {
84 84
             $delete_workflow = $this->get_workflow('delete', array('object' => $this->_object));
85 85
             $buttons[] = $delete_workflow->get_button("task/delete/{$this->_object->guid}/");
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,7 +121,8 @@  discard block
 block discarded – undo
121 121
                     );
122 122
                 }
123 123
 
124
-            } catch (midcom_error $e) {
124
+            }
125
+            catch (midcom_error $e) {
125 126
             }
126 127
         }
127 128
 
@@ -151,7 +152,8 @@  discard block
 block discarded – undo
151 152
             // This task is to be connected to a project
152 153
             try {
153 154
                 $this->_parent = new org_openpsa_projects_project($args[1]);
154
-            } catch (midcom_error $e) {
155
+            }
156
+            catch (midcom_error $e) {
155 157
                 return false;
156 158
             }
157 159
 
@@ -163,7 +165,8 @@  discard block
 block discarded – undo
163 165
         } elseif ($this->_mode == 'delete') {
164 166
             try {
165 167
                 $this->_parent = new org_openpsa_projects_project($this->_object->project);
166
-            } catch (midcom_error $e) {
168
+            }
169
+            catch (midcom_error $e) {
167 170
                 $e->log();
168 171
             }
169 172
         }
Please login to merge, or discard this patch.
lib/org/openpsa/projects/task/resource.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@
 block discarded – undo
26 26
     private function _find_duplicates()
27 27
     {
28 28
         $qb = org_openpsa_projects_task_resource_dba::new_query_builder();
29
-        $qb->add_constraint('person', '=', (int)$this->person);
30
-        $qb->add_constraint('task', '=', (int)$this->task);
31
-        $qb->add_constraint('orgOpenpsaObtype', '=', (int)$this->orgOpenpsaObtype);
29
+        $qb->add_constraint('person', '=', (int) $this->person);
30
+        $qb->add_constraint('task', '=', (int) $this->task);
31
+        $qb->add_constraint('orgOpenpsaObtype', '=', (int) $this->orgOpenpsaObtype);
32 32
 
33 33
         if ($this->id) {
34
-            $qb->add_constraint('id', '<>', (int)$this->id);
34
+            $qb->add_constraint('id', '<>', (int) $this->id);
35 35
         }
36 36
 
37 37
         return ($qb->count() > 0);
Please login to merge, or discard this patch.
lib/org/openpsa/relatedto/suspect.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     {
92 92
         $properties = array('fromClass', 'toClass', 'fromGuid', 'toGuid', 'fromComponent', 'toComponent', 'status', 'toExtra', 'toExtra');
93 93
         foreach ($properties as $property) {
94
-            if (   !empty($defaults->$property)
94
+            if (!empty($defaults->$property)
95 95
                 && empty($link->$property)) {
96 96
                 debug_add("Copying property '{$property}' ('{$defaults->$property}') from defaults");
97 97
                 $link->$property = $defaults->$property;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         }
100 100
         if ($component) {
101 101
             debug_add('$component given, guessing direction');
102
-            if (   empty($link->toComponent)
102
+            if (empty($link->toComponent)
103 103
                 && !empty($link->fromComponent)) {
104 104
                 debug_add("Setting property 'toComponent' to '{$component}'");
105 105
                 $link->toComponent = $component;
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         }
111 111
         if (is_object($obj)) {
112 112
             debug_add('$obj given, guessing direction');
113
-            if (   empty($link->toGuid)
113
+            if (empty($link->toGuid)
114 114
                 && !empty($link->fromGuid)) {
115 115
                 $link->toClass = get_class($obj);
116 116
                 $link->toGuid = $obj->guid;
Please login to merge, or discard this patch.