Completed
Pull Request — master (#198)
by
unknown
19:02
created
lib/org/openpsa/projects/handler/task/resourcing.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             return new midcom_response_relocate($this->router->generate('task_view', ['guid' => $guid]));
65 65
         }
66 66
 
67
-        if (   $request->request->has('save')
67
+        if ($request->request->has('save')
68 68
             && $prospects = $request->request->get('org_openpsa_projects_prospects')) {
69 69
             $qb = org_openpsa_projects_task_resource_dba::new_query_builder();
70 70
             $qb->add_constraint('guid', 'IN', array_keys($prospects));
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                     // create relatedto
96 96
                     org_openpsa_relatedto_plugin::create($event, 'org.openpsa.calendar', $this->_task, 'org.openpsa.projects');
97 97
                 }
98
-                if (   $update_prospect
98
+                if ($update_prospect
99 99
                     && !$prospect->update()) {
100 100
                     debug_add('Failed to update prospect: ' . midcom_connection::get_error_string(), MIDCOM_LOG_ERROR);
101 101
                 }
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/handler/subscriber.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,8 @@  discard block
 block discarded – undo
36 36
             // Add person to campaign
37 37
             try {
38 38
                 $campaign = new org_openpsa_directmarketing_campaign_dba($add_to);
39
-            } catch (midcom_error $e) {
39
+            }
40
+            catch (midcom_error $e) {
40 41
                 // FIXME: More informative error message
41 42
                 $this->notify('Failed adding person %s to campaign %s', $add_to, 'error');
42 43
                 return;
@@ -86,7 +87,8 @@  discard block
 block discarded – undo
86 87
             try {
87 88
                 $campaigns[$membership->campaign] = new org_openpsa_directmarketing_campaign_dba($membership->campaign);
88 89
                 $campaign_membership_map[$membership->campaign] = $membership;
89
-            } catch (midcom_error $e) {
90
+            }
91
+            catch (midcom_error $e) {
90 92
                 debug_add('Failed to load campaign ' . $membership->campaign . ', reason: ' . $e->getMessage());
91 93
             }
92 94
         }
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/handler/campaign/rules.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,8 @@
 block discarded – undo
105 105
         if ($request->request->has('midcom_helper_datamanager2_save')) {
106 106
             try {
107 107
                 $rules = $this->_load_rules();
108
-            } catch (midcom_error $e) {
108
+            }
109
+            catch (midcom_error $e) {
109 110
                 midcom::get()->uimessages->add('org.openpsa.directmarketing', $this->_l10n->get($e->getMessage()), 'error');
110 111
                 return;
111 112
             }
Please login to merge, or discard this patch.
lib/org/openpsa/products/handler/product/create.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,8 @@
 block discarded – undo
89 89
         } elseif ((int) $group > 0) {
90 90
             try {
91 91
                 $this->parent = new org_openpsa_products_product_group_dba((int) $group);
92
-            } catch (midcom_error $e) {
92
+            }
93
+            catch (midcom_error $e) {
93 94
                 $e->log();
94 95
             }
95 96
         }
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/handler/group/action.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,8 @@
 block discarded – undo
29 29
                 $member->require_do('midgard:update');
30 30
                 $member->extra = $request->request->get('title');
31 31
                 $response->status = $member->update();
32
-            } catch (midcom_error $e) {
32
+            }
33
+            catch (midcom_error $e) {
33 34
                 $e->log();
34 35
             }
35 36
             $response->message = midcom_connection::get_error_string();
Please login to merge, or discard this patch.
lib/org/openpsa/calendar/handler/event/create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         if ($query->has('start')) {
45 45
             $defaults['start'] = strtotime($query->get('start'));
46 46
             if ($query->has('end')) {
47
-                $defaults['end']= strtotime($query->get('end'));
47
+                $defaults['end'] = strtotime($query->get('end'));
48 48
             } else {
49 49
                 $defaults['end'] = $defaults['start'] + 3600;
50 50
             }
Please login to merge, or discard this patch.
lib/midgard/admin/asgard/handler/object/attachments.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -96,13 +96,13 @@  discard block
 block discarded – undo
96 96
         }
97 97
 
98 98
         $mimetype = $request->request->get('midgard_admin_asgard_mimetype');
99
-        if (   !empty($mimetype)
99
+        if (!empty($mimetype)
100 100
             && $local_file->mimetype != $mimetype) {
101 101
             $local_file->mimetype = $mimetype;
102 102
             $needs_update = true;
103 103
         }
104 104
 
105
-        if (   $needs_update
105
+        if ($needs_update
106 106
             && !$local_file->update()) {
107 107
             return false;
108 108
         }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         $this->bind_view_to_object($this->_file);
244 244
 
245 245
         $filename = $this->_process_form($request);
246
-        if (   $filename
246
+        if ($filename
247 247
             && $filename != $data['filename']) {
248 248
             return $this->relocate_to_file($filename);
249 249
         }
Please login to merge, or discard this patch.
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($this->router->generate('group_edit', ['guid' => $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/midcom/baseclasses/components/viewer.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -348,7 +348,8 @@
 block discarded – undo
348 348
             $result = $this->router->match($url);
349 349
             $this->_prepare_handler($result);
350 350
             return $this->_handler;
351
-        } catch (ResourceNotFoundException $e) {
351
+        }
352
+        catch (ResourceNotFoundException $e) {
352 353
             // No match
353 354
             return false;
354 355
         }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
         $prefix = midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ANCHORPREFIX);
329 329
 
330 330
         // Check if we need to start up a plugin.
331
-        if (   count($argv) > 1
331
+        if (count($argv) > 1
332 332
             && array_key_exists($argv[0], self::$_plugin_namespace_config)
333 333
             && array_key_exists($argv[1], self::$_plugin_namespace_config[$argv[0]])) {
334 334
             $namespace = array_shift($argv);
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
      */
376 376
     private function _prepare_handler(array $request)
377 377
     {
378
-        $this->_handler =& $request;
378
+        $this->_handler = & $request;
379 379
         $args = [];
380 380
         foreach ($request as $name => $value) {
381 381
             if (substr($name, 0, 1) !== '_') {
Please login to merge, or discard this patch.