Passed
Push — master ( 293021...6fdc28 )
by Andreas
12:55
created
lib/org/openpsa/user/handler/person/privileges.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
         // Get the calendar root event
26 26
         if (class_exists('org_openpsa_calendar_interface')) {
27
-            $field =& $schemadb->get('default')->get_field('calendar');
27
+            $field = & $schemadb->get('default')->get_field('calendar');
28 28
             $field['type_config']['privilege_object'] = org_openpsa_calendar_interface::find_root_event();
29 29
             $field['type_config']['assignee'] = 'user:' . $person->guid;
30 30
         }
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
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
         // Get the calendar root event
26 26
         if (class_exists('org_openpsa_calendar_interface')) {
27
-            $field =& $schemadb->get('default')->get_field('calendar');
27
+            $field = & $schemadb->get('default')->get_field('calendar');
28 28
             $field['type_config']['privilege_object'] = org_openpsa_calendar_interface::find_root_event();
29 29
             $field['type_config']['assignee'] = 'group:' . $group->guid;
30 30
         }
Please login to merge, or discard this patch.
lib/net/nehmer/blog/handler/archive.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
         $year_data = [];
106 106
         $first_post = $this->_compute_welcome_first_post();
107 107
         $this->_request_data['first_post'] = $first_post;
108
-        $this->_request_data['total_count'] =& $total_count;
109
-        $this->_request_data['year_data'] =& $year_data;
108
+        $this->_request_data['total_count'] = & $total_count;
109
+        $this->_request_data['year_data'] = & $year_data;
110 110
         if (!$first_post) {
111 111
             return;
112 112
         }
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 
242 242
             if ($category) {
243 243
                 $category = trim(strip_tags($category));
244
-                if (   $data['datamanager']->get_schema('default')->has_field('categories')
244
+                if ($data['datamanager']->get_schema('default')->has_field('categories')
245 245
                     && !$data['datamanager']->get_schema('default')->get_field('categories')['type_config']['allow_multiple']) {
246 246
                     $qb->add_constraint('extra1', '=', $category);
247 247
                 } else {
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      */
307 307
     private function _set_startend_from_month(int $year, int $month)
308 308
     {
309
-        if (   $month < 1
309
+        if ($month < 1
310 310
             || $month > 12) {
311 311
             throw new midcom_error_notfound("The month {$month} is not valid.");
312 312
         }
Please login to merge, or discard this patch.
lib/midcom/core/privilege.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * The Default constructor creates an empty privilege, if you specify
76 76
      * another privilege object in the constructor, a copy is constructed.
77 77
      */
78
-    public function __construct(midcom_core_privilege_db|array|string|null $src = null)
78
+    public function __construct(midcom_core_privilege_db | array | string | null $src = null)
79 79
     {
80 80
         if (is_array($src)) {
81 81
             // Store given values to our privilege array
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
      * - Any midcom_core_user or midcom_core_group object or subtype thereof.
211 211
      * - Any string identifier which can be resolved using midcom_services_auth::get_assignee().
212 212
      */
213
-    public function set_assignee(midcom_core_group|midcom_core_user|string $assignee) : bool
213
+    public function set_assignee(midcom_core_group | midcom_core_user | string $assignee) : bool
214 214
     {
215 215
         if (is_string($assignee)) {
216 216
             if ($this->is_magic_assignee($assignee)) {
@@ -266,12 +266,12 @@  discard block
 block discarded – undo
266 266
             }
267 267
         }
268 268
 
269
-        if (   !$this->is_magic_assignee()
269
+        if (!$this->is_magic_assignee()
270 270
             && !$this->get_assignee()) {
271 271
             debug_add("The assignee identifier '{$this->assignee}' is invalid.", MIDCOM_LOG_INFO);
272 272
             return false;
273 273
         }
274
-        if (   $this->assignee == 'OWNER'
274
+        if ($this->assignee == 'OWNER'
275 275
             && $this->privilegename == 'midgard:owner') {
276 276
             debug_add("Tried to assign midgard:owner to the OWNER magic assignee, this is invalid.", MIDCOM_LOG_INFO);
277 277
             return false;
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
                 MIDCOM_LOG_INFO);
284 284
             return false;
285 285
         }
286
-        if (   !$object->can_do('midgard:update')
286
+        if (!$object->can_do('midgard:update')
287 287
             || !$object->can_do('midgard:privileges')) {
288 288
             debug_add("Insufficient privileges on the content object with the GUID '{$this->__guid}', midgard:update and midgard:privileges required.",
289 289
                 MIDCOM_LOG_INFO);
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
         return new midcom_core_privilege($result[0]);
445 445
     }
446 446
 
447
-    private function _load(midcom_core_privilege_db|string|null $src = null)
447
+    private function _load(midcom_core_privilege_db | string | null $src = null)
448 448
     {
449 449
         if ($src instanceof midcom_core_privilege_db) {
450 450
             // Got a privilege object as argument, use that
Please login to merge, or discard this patch.
lib/midcom/services/cache/module/content.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
         $this->_uncached = $config->get('cache_module_content_uncached');
143 143
         $this->_headers_strategy = $this->get_strategy('cache_module_content_headers_strategy');
144 144
         $this->_headers_strategy_authenticated = $this->get_strategy('cache_module_content_headers_strategy_authenticated');
145
-        $this->_default_lifetime = (int)$config->get('cache_module_content_default_lifetime');
146
-        $this->_default_lifetime_authenticated = (int)$config->get('cache_module_content_default_lifetime_authenticated');
145
+        $this->_default_lifetime = (int) $config->get('cache_module_content_default_lifetime');
146
+        $this->_default_lifetime_authenticated = (int) $config->get('cache_module_content_default_lifetime_authenticated');
147 147
 
148 148
         if ($this->_headers_strategy == 'no-cache') {
149 149
             // we can't call no_cache() here, because it would try to call back to this class via the global getter
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
      */
509 509
     private function write_meta_cache(string $content_id, Request $request, Response $response)
510 510
     {
511
-        if (   $this->_uncached
511
+        if ($this->_uncached
512 512
             || $this->_no_cache) {
513 513
             return;
514 514
         }
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 
574 574
     private function store_dl_content(Request $request, Response $response)
575 575
     {
576
-        if (   $this->_no_cache
576
+        if ($this->_no_cache
577 577
             || $this->_uncached) {
578 578
             return;
579 579
         }
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
 
616 616
         /* TODO: Doublecheck the way this is handled, now we just don't send it
617 617
          * if headers_strategy implies caching */
618
-        if (   !$response->headers->has('Content-Length')
618
+        if (!$response->headers->has('Content-Length')
619 619
             && !in_array($this->_headers_strategy, ['public', 'private'])) {
620 620
             $response->headers->set("Content-Length", strlen($response->getContent()));
621 621
         }
Please login to merge, or discard this patch.
lib/midcom/helper/reflector/copy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
             $target->$name = $value;
139 139
         }
140 140
 
141
-        if (   $this->recursive
141
+        if ($this->recursive
142 142
             && $parent_property = self::get_parent_property($source)) {
143 143
 
144 144
             // Copy the link to parent
Please login to merge, or discard this patch.
src/midcom/datamanager/validation/phpValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         // enable them everywhere with -e and mask them instead
33 33
         $input = str_replace(
34 34
             ['\a', '\b', '\c', '\e', '\f', '\n', '\r', '\t', '\v'],
35
-            [ '\\\a', '\\\b', '\\\c', '\\\e', '\\\f', '\\\n', '\\\r', '\\\t', '\\\v'],
35
+            ['\\\a', '\\\b', '\\\c', '\\\e', '\\\f', '\\\n', '\\\r', '\\\t', '\\\v'],
36 36
             $input
37 37
         );
38 38
         exec(sprintf('echo -e %s | php -l', escapeshellarg($input)) . " 2>&1", $parse_results, $return_status);
Please login to merge, or discard this patch.
lib/midcom/helper/toolbar/view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
             ]);
75 75
         }
76 76
 
77
-        if (   midcom::get()->config->get('midcom_services_rcs_enable')
77
+        if (midcom::get()->config->get('midcom_services_rcs_enable')
78 78
             && $object->can_do('midgard:update')
79 79
             && $object->_use_rcs) {
80 80
             $buttons[] = [
Please login to merge, or discard this patch.
lib/org/openpsa/sales/salesproject/deliverable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     {
69 69
         $this->calculate_price(false);
70 70
 
71
-        if (   $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
71
+        if ($this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
72 72
             && $this->continuous) {
73 73
             $this->end = 0;
74 74
         } elseif ($this->end < $this->start) {
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $calculator->run($this);
130 130
         $cost = $calculator->get_cost();
131 131
         $price = $calculator->get_price();
132
-        if (   $price != $this->price
132
+        if ($price != $this->price
133 133
             || $cost != $this->cost) {
134 134
             $this->price = $price;
135 135
             $this->cost = $cost;
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $units = $hours['invoiceable'];
170 170
         $uninvoiceableUnits = $hours['reported'] - ($hours['invoiceable'] + $hours['invoiced']);
171 171
 
172
-        if (   $units != $this->units
172
+        if ($units != $this->units
173 173
             || $uninvoiceableUnits != $this->uninvoiceableUnits) {
174 174
             debug_add("agreement values have changed, setting units to " . $units . ", uninvoiceable: " . $uninvoiceableUnits);
175 175
             $this->units = $units;
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
                 break;
222 222
             case 'q':
223 223
                 // Quarterly recurring subscription
224
-                $identifier = ceil(((int)$date->format('n')) / 3) . 'Q' . $date->format('y');
224
+                $identifier = ceil(((int) $date->format('n')) / 3) . 'Q' . $date->format('y');
225 225
                 break;
226 226
             case 'hy':
227 227
                 // Half-yearly recurring subscription
228
-                $identifier = ceil(((int)$date->format('n')) / 6) . '/' . $date->format('Y');
228
+                $identifier = ceil(((int) $date->format('n')) / 6) . '/' . $date->format('Y');
229 229
                 break;
230 230
             case 'y':
231 231
                 // Yearly recurring subscription
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 
254 254
     public function invoice() : bool
255 255
     {
256
-        if (   $this->state >= self::STATE_INVOICED
256
+        if ($this->state >= self::STATE_INVOICED
257 257
             || $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION) {
258 258
             return false;
259 259
         }
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             midcom::get()->uimessages->add(midcom::get()->i18n->get_string('org.openpsa.sales', 'org.openpsa.sales'), sprintf(midcom::get()->i18n->get_string('marked deliverable "%s" delivered', 'org.openpsa.sales'), $this->title));
357 357
 
358 358
             // Check if we need to create task or ship goods
359
-            if (   $update_deliveries
359
+            if ($update_deliveries
360 360
                 && $product->orgOpenpsaObtype === org_openpsa_products_product_dba::TYPE_SERVICE) {
361 361
                 // Change status of tasks connected to the deliverable
362 362
                 $qb = org_openpsa_projects_task_dba::new_query_builder();
Please login to merge, or discard this patch.