Passed
Push — master ( a9c273...a45b4d )
by Andreas
27:21
created
lib/org/openpsa/directmarketing/sender.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -222,7 +222,8 @@  discard block
 block discarded – undo
222 222
             $this->_backend->send($person, $member, $token, $subject, $content, $from);
223 223
             self::$_messages_sent++;
224 224
             $status = org_openpsa_directmarketing_campaign_messagereceipt_dba::SENT;
225
-        } catch (midcom_error $e) {
225
+        }
226
+        catch (midcom_error $e) {
226 227
             $status = org_openpsa_directmarketing_campaign_messagereceipt_dba::FAILURE;
227 228
             if (!$this->test_mode) {
228 229
                 $params[] = [
@@ -279,7 +280,8 @@  discard block
 block discarded – undo
279 280
     {
280 281
         try {
281 282
             $person = org_openpsa_contacts_person_dba::get_cached($member->person);
282
-        } catch (midcom_error $e) {
283
+        }
284
+        catch (midcom_error $e) {
283 285
             debug_add("Person #{$member->person} deleted or missing, removing member (member #{$member->id})");
284 286
             $member->orgOpenpsaObtype = org_openpsa_directmarketing_campaign_member_dba::UNSUBSCRIBED;
285 287
             $member->delete();
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $this->from = $from;
76 76
         $this->subject = $subject;
77 77
 
78
-        if (   $message->orgOpenpsaObtype != org_openpsa_directmarketing_campaign_message_dba::EMAIL_TEXT
78
+        if ($message->orgOpenpsaObtype != org_openpsa_directmarketing_campaign_message_dba::EMAIL_TEXT
79 79
             && $message->orgOpenpsaObtype != org_openpsa_directmarketing_campaign_message_dba::EMAIL_HTML) {
80 80
             throw new midcom_error('unsupported message type');
81 81
         }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         $token .= midcom_helper_misc::random_string($this->token_size - 1, 'abcdefghijklmnopqrstuvwxyz0123456789');
220 220
 
221 221
         //If token is not free or (very, very unlikely) matches our dummy token, recurse.
222
-        if (   $token === 'dummy'
222
+        if ($token === 'dummy'
223 223
             || !org_openpsa_directmarketing_campaign_messagereceipt_dba::token_is_free($token)) {
224 224
             return $this->_create_token();
225 225
         }
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             return null;
241 241
         }
242 242
         $type = $this->_backend->get_type();
243
-        if (   $person->get_parameter('org.openpsa.directmarketing', "send_all_denied")
243
+        if ($person->get_parameter('org.openpsa.directmarketing', "send_all_denied")
244 244
             || $person->get_parameter('org.openpsa.directmarketing', "send_{$type}_denied")) {
245 245
             debug_add("Sending {$type} messages to person {$person->rname} is denied, unsubscribing member (member #{$member->id})");
246 246
             $member->orgOpenpsaObtype = org_openpsa_directmarketing_campaign_member_dba::UNSUBSCRIBED;
Please login to merge, or discard this patch.
lib/net/nemein/rss/handler/admin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         }
83 83
 
84 84
         // OPML subscription list import support
85
-        if (   array_key_exists('net_nemein_rss_manage_opml', $_FILES)
85
+        if (array_key_exists('net_nemein_rss_manage_opml', $_FILES)
86 86
             && is_uploaded_file($_FILES['net_nemein_rss_manage_opml']['tmp_name'])) {
87 87
             $opml_file = $_FILES['net_nemein_rss_manage_opml']['tmp_name'];
88 88
 
Please login to merge, or discard this patch.
src/midcom/datamanager/datamanager.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -210,8 +210,7 @@
 block discarded – undo
210 210
     {
211 211
         $ret = [];
212 212
 
213
-        foreach ($this->storage as $field => $value)
214
-        {
213
+        foreach ($this->storage as $field => $value) {
215 214
             $ret[$field] = $value->get_value();
216 215
             $config = $this->schema->get_field($field);
217 216
             if (!empty($config['type_config']['allow_multiple'])) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
     public function set_storage(midcom_core_dbaobject $storage = null, string $schemaname = null) : self
75 75
     {
76
-        if (   $schemaname === null
76
+        if ($schemaname === null
77 77
             && !empty($storage->id)) {
78 78
             $schemaname = $storage->get_parameter('midcom.helper.datamanager2', 'schema_name');
79 79
         }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         }
165 165
         $name = $this->get_name($name);
166 166
 
167
-        if (   $this->form === null
167
+        if ($this->form === null
168 168
             || $this->form->getName() != $name) {
169 169
             $this->build_form($this->get_builder($name));
170 170
         }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
     {
262 262
         $ret = true;
263 263
         foreach ($this->storage as $field) {
264
-            if (   $field instanceof recreateable
264
+            if ($field instanceof recreateable
265 265
                 && !$field->recreate()) {
266 266
                 $ret = false;
267 267
             }
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/handler/group/create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
         $this->_group = new org_openpsa_contacts_group_dba();
74 74
 
75
-        if (   $this->_type == 'organization'
75
+        if ($this->_type == 'organization'
76 76
             && $this->_parent_group) {
77 77
             $this->_group->owner = $this->_parent_group->id;
78 78
         } else {
Please login to merge, or discard this patch.
lib/org/openpsa/documents/handler/directory/create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,6 +50,6 @@
 block discarded – undo
50 50
         $indexer = new org_openpsa_documents_midcom_indexer($this->_topic);
51 51
         $indexer->index($controller->get_datamanager());
52 52
 
53
-        return $controller->get_datamanager()->get_storage()->get_value()->name. "/";
53
+        return $controller->get_datamanager()->get_storage()->get_value()->name . "/";
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
src/midcom/datamanager/storage/dbanode.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,8 @@
 block discarded – undo
30 30
         $this->config = $config;
31 31
     }
32 32
 
33
-    protected function cast($value) {
33
+    protected function cast($value)
34
+    {
34 35
         if ($this->config['type'] == 'number' && !is_numeric($value)) {
35 36
             $value = (float) $value;
36 37
         }
Please login to merge, or discard this patch.
lib/net/nemein/wiki/midcom/interfaces.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,8 @@
 block discarded – undo
30 30
             foreach ($result as $wikipage) {
31 31
                 try {
32 32
                     $datamanager->set_storage($wikipage);
33
-                } catch (midcom_error $e) {
33
+                }
34
+                catch (midcom_error $e) {
34 35
                     $e->log(MIDCOM_LOG_WARN);
35 36
                     continue;
36 37
                 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
     public function resolve_object_link(midcom_db_topic $topic, midcom_core_dbaobject $object) : ?string
46 46
     {
47
-        if (   $object instanceof midcom_db_article
47
+        if ($object instanceof midcom_db_article
48 48
             && $topic->id == $object->topic) {
49 49
             if ($object->name == 'index') {
50 50
                 return '';
Please login to merge, or discard this patch.
lib/org/openpsa/user/handler/group/privileges.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
         // Get the calendar root event
24 24
         if ($root_event = org_openpsa_calendar_interface::find_root_event()) {
25
-            $field =& $schemadb->get('default')->get_field('calendar');
25
+            $field = & $schemadb->get('default')->get_field('calendar');
26 26
             $field['type_config']['privilege_object'] = $root_event;
27 27
             $field['type_config']['assignee'] = 'group:' . $group->guid;
28 28
         }
Please login to merge, or discard this patch.
lib/org/openpsa/user/handler/person/privileges.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
         // Get the calendar root event
24 24
         if ($root_event = org_openpsa_calendar_interface::find_root_event()) {
25
-            $field =& $schemadb->get('default')->get_field('calendar');
25
+            $field = & $schemadb->get('default')->get_field('calendar');
26 26
             $field['type_config']['privilege_object'] = $root_event;
27 27
             $field['type_config']['assignee'] = 'user:' . $person->guid;
28 28
         }
Please login to merge, or discard this patch.