Passed
Push — master ( 1a9f82...722134 )
by Andreas
12:17
created
lib/midcom/helper/reflector/nameresolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function get_object_name(?string $name_property = null) : ?string
33 33
     {
34 34
         $name_property ??= midcom_helper_reflector::get_name_property($this->_object);
35
-        if (    empty($name_property)
35
+        if (empty($name_property)
36 36
             || !midcom_helper_reflector::get($this->_object)->property_exists($name_property)) {
37 37
             // Could not resolve valid property
38 38
             return null;
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
             $qb->add_constraint($child_name_property, '=', $name);
126 126
             if ($qb->count()) {
127
-                debug_add("Name clash in sibling class {$schema_type} for " . get_class($this->_object) . " #{$this->_object->id} (path '" . midcom_helper_reflector_tree::resolve_path($this->_object, '/') . "')" );
127
+                debug_add("Name clash in sibling class {$schema_type} for " . get_class($this->_object) . " #{$this->_object->id} (path '" . midcom_helper_reflector_tree::resolve_path($this->_object, '/') . "')");
128 128
                 return false;
129 129
             }
130 130
         }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         } while (!$this->name_is_unique());
200 200
 
201 201
         // Get a copy of the current, usable name
202
-        $ret = (string)$this->_object->{$name_prop};
202
+        $ret = (string) $this->_object->{$name_prop};
203 203
         // Restore the original name
204 204
         $this->_object->{$name_prop} = $original_name;
205 205
         return $ret;
Please login to merge, or discard this patch.
lib/midcom/db/attachment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         return "{$cacheroot}/{$subdir}/{$this->guid}/{$this->name}";
156 156
     }
157 157
 
158
-    public static function get_url(midgard_attachment|midcom_db_attachment|string $attachment, ?string $name = null) : string
158
+    public static function get_url(midgard_attachment | midcom_db_attachment | string $attachment, ?string $name = null) : string
159 159
     {
160 160
         if (is_string($attachment)) {
161 161
             $guid = $attachment;
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     public function update_cache()
302 302
     {
303 303
         // Check if the attachment can be read anonymously
304
-        if (   midcom::get()->config->get('attachment_cache_enabled')
304
+        if (midcom::get()->config->get('attachment_cache_enabled')
305 305
             && !$this->can_do('midgard:read', 'EVERYONE')) {
306 306
             // Not public file, ensure it is removed
307 307
             $this->remove_from_cache();
Please login to merge, or discard this patch.
lib/org/openpsa/user/handler/person/create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 
60 60
     public function _handler_create(Request $request, array &$data, ?string $guid = null)
61 61
     {
62
-        midcom::get()->auth->require_user_do('org.openpsa.user:manage', class: org_openpsa_user_interface::class);
62
+        midcom::get()->auth->require_user_do('org.openpsa.user:manage', class : org_openpsa_user_interface::class);
63 63
 
64 64
         if ($guid !== null) {
65 65
             // Get the organization
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/handler/person/create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
     public function _handler_create(Request $request, ?string $guid = null)
23 23
     {
24
-        midcom::get()->auth->require_user_do('midgard:create', class: org_openpsa_contacts_person_dba::class);
24
+        midcom::get()->auth->require_user_do('midgard:create', class : org_openpsa_contacts_person_dba::class);
25 25
 
26 26
         $defaults = [];
27 27
         if (!empty($guid)) {
Please login to merge, or discard this patch.
lib/org/openpsa/sales/handler/edit.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     public function _handler_new(Request $request, ?string $guid = null)
39 39
     {
40
-        midcom::get()->auth->require_user_do('midgard:create', class: org_openpsa_sales_salesproject_dba::class);
40
+        midcom::get()->auth->require_user_do('midgard:create', class : org_openpsa_sales_salesproject_dba::class);
41 41
 
42 42
         $this->_salesproject = new org_openpsa_sales_salesproject_dba;
43 43
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $schemadb = schemadb::from_path($this->_config->get('schemadb_salesproject'));
49 49
 
50 50
         if ($guid) {
51
-            $field =& $schemadb->get('default')->get_field('customer');
51
+            $field = & $schemadb->get('default')->get_field('customer');
52 52
             try {
53 53
                 $customer = new org_openpsa_contacts_group_dba($guid);
54 54
                 $field['type_config']['options'] = [0 => '', $customer->id => $customer->official];
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,8 @@  discard block
 block discarded – undo
54 54
                 $field['type_config']['options'] = [0 => '', $customer->id => $customer->official];
55 55
 
56 56
                 $defaults['customer'] = $customer->id;
57
-            } catch (midcom_error) {
57
+            }
58
+            catch (midcom_error) {
58 59
                 $customer = new org_openpsa_contacts_person_dba($guid);
59 60
                 $defaults['customerContact'] = $customer->id;
60 61
                 $field['type_config']['options'] = $this->list_groups([$customer->id => true]);
@@ -126,7 +127,8 @@  discard block
 block discarded – undo
126 127
             try {
127 128
                 $company = new org_openpsa_contacts_group_dba($company_id);
128 129
                 $ret[$company->id] = $company->get_label();
129
-            } catch (midcom_error $e) {
130
+            }
131
+            catch (midcom_error $e) {
130 132
                 $e->log();
131 133
             }
132 134
         }
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/handler/import.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
         if ($contacts = $importer->parse($input)) {
140 140
             $this->_request_data['import_status'] = $importer->import_subscribers($contacts, $this->_request_data['campaign']);
141
-            if (   $this->_request_data['import_status']['subscribed_new'] > 0
141
+            if ($this->_request_data['import_status']['subscribed_new'] > 0
142 142
                 || $this->_request_data['import_status']['already_subscribed'] > 0) {
143 143
                 $this->_import_success = true;
144 144
             }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                 $read_rows = 0;
196 196
                 $handle = fopen($data['tmp_file'], 'r');
197 197
                 $total_columns = 0;
198
-                while (   $read_rows < 2
198
+                while ($read_rows < 2
199 199
                        && $csv_line = fgetcsv($handle, 1000, $data['separator'])) {
200 200
                     if ($total_columns == 0) {
201 201
                         $total_columns = count($csv_line);
Please login to merge, or discard this patch.
lib/org/openpsa/sales/validator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     {
18 18
         $result = $this->validate_units($fields);
19 19
 
20
-        if (   empty($fields['end'])
20
+        if (empty($fields['end'])
21 21
             && empty($fields['continuous'])) {
22 22
             if ($result === true) {
23 23
                 $result = [];
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     public function validate_units(array $fields)
31 31
     {
32
-        if (   empty($fields['invoiceByActualUnits'])
32
+        if (empty($fields['invoiceByActualUnits'])
33 33
             && empty($fields['plannedUnits'])) {
34 34
             return [
35 35
                 'plannedUnits' => midcom::get()->i18n->get_string('select either planned units or invoice by actual units', 'org.openpsa.sales')
Please login to merge, or discard this patch.
lib/org/openpsa/sales/handler/deliverable/admin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
             $schema->get_field('next_cycle')['hidden'] = false;
38 38
             $schema->get_field('next_cycle')['default'] = $entry->start;
39 39
             $schema->get_field('at_entry')['default'] = $entry->id;
40
-        } elseif (   ($this->_deliverable->continuous || $this->_deliverable->end > time())
40
+        } elseif (($this->_deliverable->continuous || $this->_deliverable->end > time())
41 41
                   && $this->_deliverable->state == org_openpsa_sales_salesproject_deliverable_dba::STATE_STARTED) {
42 42
             $schema->get_field('next_cycle')['hidden'] = false;
43 43
         }
Please login to merge, or discard this patch.
lib/net/nehmer/comments/handler/moderate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $message['title'] = sprintf($this->_l10n->get('comment %s reported as abuse'), $comment->title);
54 54
         $message['content'] = '';
55 55
         if ($logs = $comment->get_logs()) {
56
-            $message['content'] .= $this->_l10n->get('moderation history').":\n\n";
56
+            $message['content'] .= $this->_l10n->get('moderation history') . ":\n\n";
57 57
             foreach ($logs as $time => $log) {
58 58
                 $reported = $this->_l10n->get_formatter()->datetime(strtotime("{$time}Z"));
59 59
                 $message['content'] .= $this->_l10n->get(sprintf('%s: %s by %s (from %s)', "$reported:\n", $this->_l10n->get($log['action']), $log['reporter'], $log['ip'])) . "\n\n";
Please login to merge, or discard this patch.