Passed
Pull Request — master (#204)
by
unknown
23:41
created
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.
lib/midcom/admin/folder/handler/move.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     {
35 35
         $this->_object = midcom::get()->dbfactory->get_object_by_guid($guid);
36 36
 
37
-        if (   !is_a($this->_object, midcom_db_topic::class)
37
+        if (!is_a($this->_object, midcom_db_topic::class)
38 38
             && !is_a($this->_object, midcom_db_article::class)) {
39 39
             throw new midcom_error_notfound("Moving only topics and articles is supported.");
40 40
         }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             $folder = midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ROOTTOPIC);
76 76
         }
77 77
 
78
-        if (   is_a($this->_object, midcom_db_topic::class)
78
+        if (is_a($this->_object, midcom_db_topic::class)
79 79
             && $folder->up == $this->_object->id) {
80 80
             $tree_disabled = true;
81 81
         }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             $selected = ' checked="checked"';
89 89
         }
90 90
 
91
-        if (   !is_a($this->_object, midcom_db_topic::class)
91
+        if (!is_a($this->_object, midcom_db_topic::class)
92 92
             && $folder->component !== $this->_request_data['current_folder']->component) {
93 93
             // Non-topic objects may only be moved under folders of same component
94 94
             $class = 'wrong_component';
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,8 @@
 block discarded – undo
46 46
                 $target = new midcom_db_topic((int) $request->request->get('move_to'));
47 47
                 $this->_move_object($target);
48 48
                 midcom::get()->uimessages->add($this->_l10n->get($this->_component), sprintf($this->_l10n->get('moved %s to %s'), $this->_topic->get_label(), $target->get_label()));
49
-            } catch (midcom_error $e) {
49
+            }
50
+            catch (midcom_error $e) {
50 51
                 midcom::get()->uimessages->add($this->_l10n->get($this->_component), $e->getMessage(), 'error');
51 52
             }
52 53
         }
Please login to merge, or discard this patch.
lib/midcom/helper/imagepopup/handler/list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         midcom::get()->auth->require_valid_user();
34 34
         midcom::get()->skip_page_style = true;
35 35
 
36
-        $this->add_stylesheet(MIDCOM_STATIC_URL ."/midcom.helper.imagepopup/styling.css", 'screen');
36
+        $this->add_stylesheet(MIDCOM_STATIC_URL . "/midcom.helper.imagepopup/styling.css", 'screen');
37 37
 
38 38
         $data['filetype'] = $filetype;
39 39
         $data['object'] = null;
Please login to merge, or discard this patch.
lib/org/openpsa/user/handler/person/account.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
         $workflow = $this->get_workflow('datamanager', ['controller' => $data['controller']]);
59 59
         $response = $workflow->run($request);
60 60
 
61
-        if (   $workflow->get_state() == 'save'
61
+        if ($workflow->get_state() == 'save'
62 62
             && $this->create_account($this->person, $data["controller"]->get_form_values())) {
63 63
             midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.user'), sprintf($this->_l10n->get('person %s created'), $this->person->name));
64 64
         }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $accounthelper = new org_openpsa_user_accounthelper($this->person);
149 149
 
150 150
         // Update account
151
-        if (   !$accounthelper->set_account($controller->get_form_values()["username"], $password)
151
+        if (!$accounthelper->set_account($controller->get_form_values()["username"], $password)
152 152
             && midcom_connection::get_error() != MGD_ERR_OK) {
153 153
             // Failure, give a message
154 154
             midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.user'), $this->_l10n->get("failed to update the user account, reason") . ': ' . midcom_connection::get_error_string(), 'error');
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/handler/message/send.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
     {
76 76
         $nap = new midcom_helper_nav();
77 77
         $node = $nap->get_node($nap->get_current_node());
78
-        $compose_url = $node[MIDCOM_NAV_RELATIVEURL] . 'message/compose/' . $data['message']->guid .'/';
78
+        $compose_url = $node[MIDCOM_NAV_RELATIVEURL] . 'message/compose/' . $data['message']->guid . '/';
79 79
         $data['batch_url_base_full'] = $node[MIDCOM_NAV_RELATIVEURL] . 'message/send_bg/' . $data['message']->guid . '/';
80 80
         debug_add("compose_url: {$compose_url}");
81 81
         debug_add("batch_url base: {$data['batch_url_base_full']}");
Please login to merge, or discard this patch.