Passed
Pull Request — master (#204)
by
unknown
23:41
created
lib/org/openpsa/projects/handler/task/list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@
 block discarded – undo
169 169
             case 'proposed':
170 170
                 $html = $this->render_status($task->manager, "from %s");
171 171
                 $task->get_members();
172
-                if (   $task->can_do('midgard:update')
172
+                if ($task->can_do('midgard:update')
173 173
                     && isset($task->resources[midcom_connection::get_user()])) {
174 174
                     $html .= '<form method="post" action="' . $this->router->generate('workflow', ['guid' => $task->guid]) . '">';
175 175
                     //TODO: If we need all resources to accept task hide tools when we have accepted and replace with "pending acceptance from..."
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/type/captchaType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,12 +35,12 @@
 block discarded – undo
35 35
     public function buildForm(FormBuilderInterface $builder, array $options)
36 36
     {
37 37
         $session_key = md5($builder->getForm()->getName() . '_session_key');
38
-        $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($session_key) {
38
+        $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($session_key) {
39 39
             $value = $event->getForm()->getData();
40 40
             $session = new midcom_services_session('midcom_datamanager_captcha');
41 41
             $l10n = midcom::get()->i18n->get_l10n('midcom.datamanager');
42 42
 
43
-            if (   !$session->exists($session_key)
43
+            if (!$session->exists($session_key)
44 44
                 || $value != $session->get($session_key)) {
45 45
                 $event->getForm()->addError(new FormError($l10n->get('captcha validation failed')));
46 46
             }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/transformer/jsdateTransformer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
             }
34 34
         }
35 35
 
36
-        if (   empty($input)
37
-            || (   $input instanceof DateTime
36
+        if (empty($input)
37
+            || ($input instanceof DateTime
38 38
                 && $input->format('Y-m-d H:i:s') == '0001-01-01 00:00:00')) {
39 39
             return $result;
40 40
         }
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
             throw new TransformationFailedException('Expected an array.');
60 60
         }
61 61
 
62
-        if (   empty($array['date'])
63
-            || (   $array['date'] instanceof DateTime
62
+        if (empty($array['date'])
63
+            || ($array['date'] instanceof DateTime
64 64
                 && $array['date']->format('Y-m-d H:i:s') == '0001-01-01 00:00:00')) {
65 65
             return;
66 66
         }
Please login to merge, or discard this patch.
lib/midcom/core/user.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
         $this->_inheritance_chains = [];
359 359
 
360 360
         foreach ($this->_direct_groups as $id => $group) {
361
-            $this->_all_groups[$id] =& $this->_direct_groups[$id];
361
+            $this->_all_groups[$id] = & $this->_direct_groups[$id];
362 362
             $inheritance_chain = [$group->id];
363 363
             /**
364 364
              * FIXME: Parent group members should inherit permissions from
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
 
533 533
         $timeout = midcom::get()->config->get('auth_login_session_timeout', 0);
534 534
         $last_seen = $person->get_parameter('midcom', 'online');
535
-        if (   !$last_seen
535
+        if (!$last_seen
536 536
             || ($timeout > 0 && time() - $timeout > $last_seen)) {
537 537
             return 'offline';
538 538
         }
Please login to merge, or discard this patch.
lib/midcom/services/auth/acl.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -600,10 +600,10 @@  discard block
 block discarded – undo
600 600
         }
601 601
 
602 602
         //owner privileges override everything but person privileges, so we have to cross-check those here
603
-        if (   $privilegename != 'midgard:owner'
603
+        if ($privilegename != 'midgard:owner'
604 604
             && $last_scope < MIDCOM_PRIVILEGE_SCOPE_OWNER) {
605 605
             $owner_privileges = $this->get_owner_default_privileges();
606
-            if (    array_key_exists($privilegename, $owner_privileges)
606
+            if (array_key_exists($privilegename, $owner_privileges)
607 607
                  && $this->_load_content_privilege('midgard:owner', $guid, $class, $user_id)
608 608
                  && self::$_content_privileges_cache[$cache_id]['midgard:owner']) {
609 609
                 self::$_content_privileges_cache[$cache_id][$privilegename] = ($owner_privileges[$privilegename] == MIDCOM_PRIVILEGE_ALLOW);
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
         //if nothing was found, we try to recurse to parent
620 620
         list ($parent_guid, $parent_class) = $this->get_parent_data($guid, $class);
621 621
 
622
-        if (   $parent_guid == $guid
622
+        if ($parent_guid == $guid
623 623
             || !mgd_is_guid($parent_guid)) {
624 624
             return false;
625 625
         }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/subscriber/purifySubscriber.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     public function purify_content(FormEvent $event)
42 42
     {
43
-        if (   isset($this->config['Cache']['SerializerPath'])
43
+        if (isset($this->config['Cache']['SerializerPath'])
44 44
             && !file_exists($this->config['Cache']['SerializerPath'])) {
45 45
             mkdir($this->config['Cache']['SerializerPath']);
46 46
         }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
         // Load custom element/attribute definitions
56 56
         $definitions = $this->get_from_global_config('html_purify_HTMLDefinition');
57
-        if (   !empty($definitions)
57
+        if (!empty($definitions)
58 58
             && $def = $purifier_config->maybeGetRawHTMLDefinition()) {
59 59
             if (!empty($definitions['addAttribute'])) {
60 60
                 foreach (array_filter((array) $definitions['addAttribute'], 'is_array') as $attrdef) {
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/scheduler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         }
95 95
 
96 96
         // TODO: Warehouse management: create new order
97
-        if (   $this->_deliverable->end < $next_cycle_start
97
+        if ($this->_deliverable->end < $next_cycle_start
98 98
             && $this->_deliverable->end != 0) {
99 99
             debug_add('Do not register next cycle, the contract ends before');
100 100
             return $this->_deliverable->end_subscription();
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 
314 314
         //If previous cycle was run at the end of the month, the new one should be at the end of the month as well
315 315
         $date = new DateTime(gmdate('Y-m-d', $time), new DateTimeZone('GMT'));
316
-        if (   $date->format('t') == $date->format('j')
316
+        if ($date->format('t') == $date->format('j')
317 317
             && $new_date->format('t') != $new_date->format('j')) {
318 318
             $new_date->setDate((int) $new_date->format('Y'), (int) $new_date->format('m'), (int) $new_date->format('t'));
319 319
         }
@@ -373,11 +373,11 @@  discard block
 block discarded – undo
373 373
                 break;
374 374
             case 'q':
375 375
                 // Quarterly recurring subscription
376
-                $identifier = ceil(((int)$date->format('n')) / 4) . 'Q' . $date->format('y');
376
+                $identifier = ceil(((int) $date->format('n')) / 4) . 'Q' . $date->format('y');
377 377
                 break;
378 378
             case 'hy':
379 379
                 // Half-yearly recurring subscription
380
-                $identifier = ceil(((int)$date->format('n')) / 6) . '/' . $date->format('Y');
380
+                $identifier = ceil(((int) $date->format('n')) / 6) . '/' . $date->format('Y');
381 381
                 break;
382 382
             case 'y':
383 383
                 // Yearly recurring subscription
Please login to merge, or discard this patch.
lib/midcom/helper/search/handler/search.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $node = $nap->get_node($node_id);
56 56
 
57
-        if (   !array_key_exists($node[MIDCOM_NAV_COMPONENT], $this->_request_data['components'])
57
+        if (!array_key_exists($node[MIDCOM_NAV_COMPONENT], $this->_request_data['components'])
58 58
             && $node[MIDCOM_NAV_COMPONENT] != 'midcom.helper.search') {
59 59
             $l10n = $this->_i18n->get_l10n($node[MIDCOM_NAV_COMPONENT]);
60 60
             $this->_request_data['components'][$node[MIDCOM_NAV_COMPONENT]] = $l10n->get($node[MIDCOM_NAV_COMPONENT]);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         }
108 108
         $this->prepare_formdata($_REQUEST['type']);
109 109
 
110
-        if (   count(explode(' ', $data['query'])) == 1
110
+        if (count(explode(' ', $data['query'])) == 1
111 111
             && strpos($data['query'], '*') === false
112 112
             && $this->_config->get('single_term_auto_wildcard')) {
113 113
             //If there is only one search term append * to the query if auto_wildcard is enabled
@@ -181,12 +181,12 @@  discard block
 block discarded – undo
181 181
             $this->_request_data['last_document_number'] = $last_document_id + 1;
182 182
             $this->_request_data['shown_documents'] = $last_document_id - $first_document_id + 1;
183 183
             $this->_request_data['results_per_page'] = $results_per_page;
184
-            $this->_request_data['all_results'] =& $result;
184
+            $this->_request_data['all_results'] = & $result;
185 185
             $this->_request_data['result'] = array_slice($result, $first_document_id, $results_per_page);
186 186
 
187 187
             // Register GUIDs for cache engine
188 188
             foreach ($this->_request_data['result'] as $doc) {
189
-                if (   !isset($doc->source)
189
+                if (!isset($doc->source)
190 190
                     || !mgd_is_guid($doc->source)) {
191 191
                     // Non-Midgard results don't need to go through cache registration
192 192
                     continue;
Please login to merge, or discard this patch.
lib/midcom/admin/rcs/style/midcom-admin-rcs-diff.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,14 +27,14 @@
 block discarded – undo
27 27
 
28 28
     $changes = true;
29 29
 
30
-    echo "<dt>". $data['handler']->translate($attribute) ."</dt>\n";
30
+    echo "<dt>" . $data['handler']->translate($attribute) . "</dt>\n";
31 31
     echo "    <dd>\n";
32 32
     echo $values['diff'];
33 33
     echo "    </dd>\n";
34 34
 }
35 35
 
36 36
 if (!$changes) {
37
-    echo "<dt>". $data['l10n']->get('no changes in content') ."</dt>\n";
37
+    echo "<dt>" . $data['l10n']->get('no changes in content') . "</dt>\n";
38 38
 }
39 39
 ?>
40 40
 </dl>
41 41
\ No newline at end of file
Please login to merge, or discard this patch.