Completed
Push — master ( da2115...dd0feb )
by Andreas
18:06
created
lib/midcom/helper/nav/main.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
                     $entry = "<span class=\"{$current_class}\">{$entry}</span>";
436 436
                 }
437 437
             } else {
438
-                if (   !empty($data['napobject'][MIDCOM_NAV_GUID])
438
+                if (!empty($data['napobject'][MIDCOM_NAV_GUID])
439 439
                     && in_array($data['napobject'][MIDCOM_NAV_GUID], $skip_guids)) {
440 440
                     continue;
441 441
                 }
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
                     $id = "custom-{$key}";
555 555
 
556 556
                     $url = "{$prefix}{$entry[MIDCOM_NAV_URL]}";
557
-                    if (   substr($entry[MIDCOM_NAV_URL], 0, 1) == '/'
557
+                    if (substr($entry[MIDCOM_NAV_URL], 0, 1) == '/'
558 558
                         || preg_match('|^https?://|', $entry[MIDCOM_NAV_URL])) {
559 559
                         $url = $entry[MIDCOM_NAV_URL];
560 560
                     }
Please login to merge, or discard this patch.
lib/midcom/helper/imagefilter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             debug_add("The File {$filename} is not writable.", MIDCOM_LOG_ERROR);
191 191
             return false;
192 192
         }
193
-        if (   !empty($this->_filename)
193
+        if (!empty($this->_filename)
194 194
             && $this->_filename !== $filename) {
195 195
             $this->_tmpfiles[] = $this->_filename;
196 196
         }
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
         $tmpfile = null;
412 412
         $imagesize = getimagesize($this->_filename);
413 413
 
414
-        if (   $imagesize[2] == IMAGETYPE_JPEG
414
+        if ($imagesize[2] == IMAGETYPE_JPEG
415 415
             && $this->_jpegtran_available()) {
416 416
             /* jpegtran */
417 417
             $operations = [
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
         $imagesize = getimagesize($this->_filename);
480 480
 
481 481
         // Try lossless jpegtran rotation if possible
482
-        if (   $imagesize[2] == IMAGETYPE_JPEG
482
+        if ($imagesize[2] == IMAGETYPE_JPEG
483 483
             && ($rotate % 90 == 0)
484 484
             && $this->_jpegtran_available()) {
485 485
             $tmpfile = $this->_get_tempfile();
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
      */
610 610
     public function fill($x = null, $y = null, $color = null, $gravity = 'center')
611 611
     {
612
-        if (   empty($x)
612
+        if (empty($x)
613 613
             || empty($y)
614 614
             || empty($color)) {
615 615
             //This is a bit silly, but here for backwards compatibility...
Please login to merge, or discard this patch.
lib/midcom/admin/help/help.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -183,9 +183,9 @@  discard block
 block discarded – undo
183 183
         $files = [];
184 184
         $pattern = $component_dir . '*.{' . midcom::get()->i18n->get_current_language() . ',' . midcom::get()->config->get('i18n_fallback_language') . '}.txt';
185 185
 
186
-        foreach (glob($pattern, GLOB_NOSORT|GLOB_BRACE) as $path) {
186
+        foreach (glob($pattern, GLOB_NOSORT | GLOB_BRACE) as $path) {
187 187
             $entry = basename($path);
188
-            if (    substr($entry, 0, 5) == 'index'
188
+            if (substr($entry, 0, 5) == 'index'
189 189
                  || substr($entry, 0, 7) == 'handler'
190 190
                  || substr($entry, 0, 9) == 'urlmethod') {
191 191
                 // Ignore dotfiles, handlers & index.lang.txt
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         $data = [];
237 237
 
238 238
         $exec_path = midcom::get()->componentloader->path_to_snippetpath($component) . '/exec/';
239
-        if (   !is_dir($exec_path)
239
+        if (!is_dir($exec_path)
240 240
             || !is_readable($exec_path)) {
241 241
             // Directory not accessible, skip loading it
242 242
             return $data;
Please login to merge, or discard this patch.
lib/org/openpsa/reports/handler/base.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
             $data['query'] = new org_openpsa_reports_query_dba($args[0]);
91 91
             $data['query']->require_do('midgard:update');
92 92
         } else {
93
-            $data['query']= new org_openpsa_reports_query_dba();
93
+            $data['query'] = new org_openpsa_reports_query_dba();
94 94
             $data['query']->component = $this->_component;
95 95
         }
96 96
 
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/handler/import.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         $contacts = $importer->parse($input);
152 152
         if (!empty($contacts)) {
153 153
             $this->_request_data['import_status'] = $importer->import_subscribers($contacts, $this->_request_data['campaign']);
154
-            if (   $this->_request_data['import_status']['subscribed_new'] > 0
154
+            if ($this->_request_data['import_status']['subscribed_new'] > 0
155 155
                 || $this->_request_data['import_status']['already_subscribed'] > 0) {
156 156
                 $this->_import_success = true;
157 157
             }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         // Update the breadcrumb line
190 190
         $this->_update_breadcrumb($handler_id, $guid);
191 191
 
192
-        if (   $request->request->has('org_openpsa_directmarketing_import')
192
+        if ($request->request->has('org_openpsa_directmarketing_import')
193 193
             && is_uploaded_file($_FILES['org_openpsa_directmarketing_import_upload']['tmp_name'])) {
194 194
             $importer = new org_openpsa_directmarketing_importer_vcards($this->_schemadbs);
195 195
             $this->_run_import($importer, $_FILES['org_openpsa_directmarketing_import_upload']['tmp_name']);
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
                 $read_rows = 0;
245 245
                 $handle = fopen($data['tmp_file'], 'r');
246 246
                 $total_columns = 0;
247
-                while (   $read_rows < 2
247
+                while ($read_rows < 2
248 248
                        && $csv_line = fgetcsv($handle, 1000, $data['separator'])) {
249 249
                     if ($total_columns == 0) {
250 250
                         $total_columns = count($csv_line);
Please login to merge, or discard this patch.
lib/org/openpsa/relatedto/handler/relatedto.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@
 block discarded – undo
216 216
     private function _render_line(array $link, &$other_obj)
217 217
     {
218 218
         $this->_request_data['link'] = $link;
219
-        $this->_request_data['other_obj'] =& $other_obj;
219
+        $this->_request_data['other_obj'] = & $other_obj;
220 220
 
221 221
         $ref = midcom_helper_reflector::get($link['class']);
222 222
 
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/group.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 __set($name, $value)
61 61
     {
62
-        if (   $name == 'homepage'
62
+        if ($name == 'homepage'
63 63
             && !empty($value)
64 64
             && $value != $this->homepage) {
65 65
             $this->_register_prober = true;
Please login to merge, or discard this patch.
lib/org/openpsa/calendar/event/member.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             $event = new org_openpsa_calendar_event_dba($this->eid);
69 69
         }
70 70
 
71
-        if (    $recipient->id == midcom_connection::get_user()
71
+        if ($recipient->id == midcom_connection::get_user()
72 72
              && !$event->send_notify_me) {
73 73
             //Do not send notification to current user
74 74
             debug_add('event->send_notify_me is false and recipient is current user, aborting notify');
@@ -203,12 +203,12 @@  discard block
 block discarded – undo
203 203
             $workday_starts = 8;
204 204
             $workday_ends = 16;
205 205
 
206
-            $workday_starts_ts = mktime($workday_starts, 0, 0, (int)$ymd_matches[2], (int)$ymd_matches[3], (int)$ymd_matches[1]);
207
-            $workday_ends_ts = mktime($workday_ends, 0, 0, (int)$ymd_matches[2], (int)$ymd_matches[3], (int)$ymd_matches[1]);
206
+            $workday_starts_ts = mktime($workday_starts, 0, 0, (int) $ymd_matches[2], (int) $ymd_matches[3], (int) $ymd_matches[1]);
207
+            $workday_ends_ts = mktime($workday_ends, 0, 0, (int) $ymd_matches[2], (int) $ymd_matches[3], (int) $ymd_matches[1]);
208 208
             $last_end_time = false;
209 209
             $last_event = false;
210 210
             foreach ($events as $event) {
211
-                if (   $event->end <= $workday_starts_ts
211
+                if ($event->end <= $workday_starts_ts
212 212
                     || $event->start >= $workday_ends_ts) {
213 213
                     // We need not to consider this event, it is outside the defined workday
214 214
                     continue;
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
             if ($last_end_time === false) {
239 239
                 $last_end_time = $workday_starts_ts;
240 240
             }
241
-            if (   $last_end_time < $workday_ends_ts
241
+            if ($last_end_time < $workday_ends_ts
242 242
                 && (($workday_ends_ts - $last_end_time) >= $amount)) {
243 243
                 $slots[] = self::_create_slot($last_end_time, $workday_ends_ts, $last_event);
244 244
             }
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/billing/data.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     public static function get_by_object(org_openpsa_invoices_interfaces_customer $object)
62 62
     {
63 63
         if (   !($bd = self::get_billing_data(org_openpsa_contacts_group_dba::class, $object->customer))
64
-               // check if the customerContact is set and has invoice_data
64
+                // check if the customerContact is set and has invoice_data
65 65
             && !($bd = self::get_billing_data(org_openpsa_contacts_person_dba::class, $object->customerContact))) {
66 66
             $bd = new self();
67 67
             $due = midcom_baseclasses_components_configuration::get('org.openpsa.invoices', 'config')->get('default_due_days');
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
      */
61 61
     public static function get_by_object(org_openpsa_invoices_interfaces_customer $object)
62 62
     {
63
-        if (   !($bd = self::get_billing_data(org_openpsa_contacts_group_dba::class, $object->customer))
63
+        if (!($bd = self::get_billing_data(org_openpsa_contacts_group_dba::class, $object->customer))
64 64
                // check if the customerContact is set and has invoice_data
65 65
             && !($bd = self::get_billing_data(org_openpsa_contacts_person_dba::class, $object->customerContact))) {
66 66
             $bd = new self();
Please login to merge, or discard this patch.