Test Failed
Branch master (8d1702)
by Andreas
11:03
created
lib/org/openpsa/directmarketing/handler/logger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
         $qb = org_openpsa_directmarketing_campaign_messagereceipt_dba::new_query_builder();
86 86
         $qb->add_constraint('token', '=', $token);
87 87
         $qb->add_constraint('orgOpenpsaObtype', '=', $type);
88
-        $ret =  $qb->execute();
88
+        $ret = $qb->execute();
89 89
         debug_print_r("_qb_token_receipts({$token}) returned", $ret);
90 90
         if (empty($ret)) {
91 91
             midcom::get()->auth->drop_sudo();
Please login to merge, or discard this patch.
lib/midcom/helper/reflector/main.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 
432 432
         $label_prop = $this->get_label_property();
433 433
 
434
-        if (    is_string($label_prop)
434
+        if (is_string($label_prop)
435 435
              && $label_prop != 'guid'
436 436
              && midcom::get()->dbfactory->property_exists($this->_dummy_object, $label_prop)) {
437 437
             $search_properties[$label_prop] = true;
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
                 continue;
493 493
             }
494 494
 
495
-            if (   !$ref->is_link($property)
495
+            if (!$ref->is_link($property)
496 496
                 && $ref->get_midgard_type($property) != MGD_TYPE_GUID) {
497 497
                 continue;
498 498
             }
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
                 return $schema_type;
557 557
             }
558 558
         }
559
-        if (   isset($extends[$schema_type])
559
+        if (isset($extends[$schema_type])
560 560
             && class_exists($extends[$schema_type])) {
561 561
             return $extends[$schema_type];
562 562
         }
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
     {
577 577
         $one = self::resolve_baseclass($class_one);
578 578
         $two = self::resolve_baseclass($class_two);
579
-        return (   $one == $two
579
+        return ($one == $two
580 580
                 || self::class_rewrite($one) == $two
581 581
                 || $one == self::class_rewrite($two));
582 582
     }
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
         // Check for decorators first
636 636
         if (!empty($class_instance->__mgdschema_class_name__)) {
637 637
             $parent_class = $class_instance->__mgdschema_class_name__;
638
-            if (   !empty($class_instance->__object)
638
+            if (!empty($class_instance->__object)
639 639
                 && !$class_instance->__object instanceof $class_instance->__mgdschema_class_name__) {
640 640
                 $parent_class = get_class($class_instance->__object);
641 641
                 debug_add('mgdschema object class ' . $parent_class . ' is not an instance of ' . $class_instance->__mgdschema_class_name__, MIDCOM_LOG_INFO);
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
         $name_exceptions = $this->_config->get('name_exceptions');
671 671
         foreach ($name_exceptions as $class => $property) {
672 672
             if (midcom::get()->dbfactory->is_a($object, $class)) {
673
-                if (   $property !== false
673
+                if ($property !== false
674 674
                     && !midcom::get()->dbfactory->property_exists($object, $property)) {
675 675
                     debug_add("Matched class '{$key}' to '{$class}' via is_a but property '{$property}' does not exist", MIDCOM_LOG_ERROR);
676 676
                     self::$_cache['name'][$key] = false;
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
         if (is_null($title_property)) {
729 729
             $title_property = self::get_title_property($object);
730 730
         }
731
-        if (   empty($title_property)
731
+        if (empty($title_property)
732 732
             || !midcom::get()->dbfactory->property_exists($object, $title_property)) {
733 733
             // Could not resolve valid property
734 734
             return false;
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
 
776 776
         foreach ($title_exceptions as $class => $property) {
777 777
             if (midcom::get()->dbfactory->is_a($object, $class)) {
778
-                if (   $property !== false
778
+                if ($property !== false
779 779
                     && !midcom::get()->dbfactory->property_exists($object, $property)) {
780 780
                     debug_add("Matched class '{$key}' to '{$class}' via is_a but property '{$property}' does not exist", MIDCOM_LOG_ERROR);
781 781
                     self::$_cache['title'][$key] = false;
Please login to merge, or discard this patch.
lib/midcom/core/user.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     private function _load_from_string($id, $person_class)
214 214
     {
215 215
         // Don't even try with the magic assignees
216
-        if (   'ANONYMOUS' === $id
216
+        if ('ANONYMOUS' === $id
217 217
             || 'EVERYONE' === $id
218 218
             || 'USERS' === $id
219 219
             || 'OWNER' === $id
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
         $this->_inheritance_chains = array();
362 362
 
363 363
         foreach ($this->_direct_groups as $id => $group) {
364
-            $this->_all_groups[$id] =& $this->_direct_groups[$id];
364
+            $this->_all_groups[$id] = & $this->_direct_groups[$id];
365 365
             $inheritance_chain = array($group->id);
366 366
             /**
367 367
              * FIXME: Parent group members should inherit permissions from
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
         }
491 491
         // We scan through our groups looking for a midgard group with the right name
492 492
         foreach ($this->_all_groups as $group_object) {
493
-            if (   midcom::get()->dbfactory->is_a($group_object, 'midcom_core_group')
493
+            if (midcom::get()->dbfactory->is_a($group_object, 'midcom_core_group')
494 494
                 && $group_object->get_storage()->name == $group) {
495 495
                 return true;
496 496
             }
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
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      */
212 212
     public function set_assignee($assignee)
213 213
     {
214
-        if (   is_a($assignee, 'midcom_core_user')
214
+        if (is_a($assignee, 'midcom_core_user')
215 215
             || is_a($assignee, 'midcom_core_group')) {
216 216
             $this->assignee = $assignee->id;
217 217
         } elseif (is_string($assignee)) {
@@ -256,27 +256,27 @@  discard block
 block discarded – undo
256 256
         }
257 257
 
258 258
         // 2. Assignee
259
-        if (   !$this->is_magic_assignee()
259
+        if (!$this->is_magic_assignee()
260 260
             && !$this->get_assignee()) {
261 261
             debug_add("The assignee identifier '{$this->assignee}' is invalid.", MIDCOM_LOG_INFO);
262 262
             return false;
263 263
         }
264 264
 
265
-        if (   $this->assignee == 'SELF'
265
+        if ($this->assignee == 'SELF'
266 266
             && $this->classname != ''
267 267
             && !class_exists($this->classname)) {
268 268
             debug_add("The class '{$this->classname}' is not loaded, the SELF magic assignee with class restriction is invalid therefore.", MIDCOM_LOG_INFO);
269 269
             return false;
270 270
         }
271 271
 
272
-        if (   $this->assignee != 'SELF'
272
+        if ($this->assignee != 'SELF'
273 273
             && $this->classname != '') {
274 274
             debug_add("The classname parameter was specified without having the magic assignee SELF set, this is invalid.", MIDCOM_LOG_INFO);
275 275
             return false;
276 276
         }
277 277
 
278 278
         // Prevent owner assignments to owners
279
-        if (   $this->assignee == 'OWNER'
279
+        if ($this->assignee == 'OWNER'
280 280
             && $this->privilegename == 'midgard:owner') {
281 281
             debug_add("Tried to assign midgard:owner to the OWNER magic assignee, this is invalid.", MIDCOM_LOG_INFO);
282 282
             return false;
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
                 MIDCOM_LOG_INFO);
289 289
             return false;
290 290
         }
291
-        if (   !$object->can_do('midgard:update')
291
+        if (!$object->can_do('midgard:update')
292 292
             || !$object->can_do('midgard:privileges')) {
293 293
             debug_add("Insufficient privileges on the content object with the GUID '{$this->__guid}', midgard:update and midgard:privileges required.",
294 294
                 MIDCOM_LOG_INFO);
Please login to merge, or discard this patch.
lib/midcom/services/dbclassloader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@
 block discarded – undo
153 153
         foreach ($definitions as $mgdschema_class => $midcom_class) {
154 154
             $this->_mgdschema_class_handler[$midcom_class] = $component;
155 155
 
156
-            if (   substr($mgdschema_class, 0, 8) == 'midgard_'
156
+            if (substr($mgdschema_class, 0, 8) == 'midgard_'
157 157
                 || substr($mgdschema_class, 0, 12) == 'midcom_core_'
158 158
                 || $mgdschema_class == midcom::get()->config->get('person_class')) {
159 159
                 $this->_midgard_classes[$mgdschema_class] = $midcom_class;
Please login to merge, or discard this patch.
lib/midcom/services/cache/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
 
144 144
         $this->_modules[$name] = new $classname();
145 145
         $this->_modules[$name]->initialize();
146
-        $this->$name =& $this->_modules[$name];
146
+        $this->$name = & $this->_modules[$name];
147 147
         array_unshift($this->_unload_queue, $name);
148 148
     }
149 149
 
Please login to merge, or discard this patch.
rootfile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     include __DIR__ . '/config-default.inc.php';
24 24
 }
25 25
 
26
-if (! defined('MIDCOM_STATIC_URL')) {
26
+if (!defined('MIDCOM_STATIC_URL')) {
27 27
     define('MIDCOM_STATIC_URL', '/midcom-static');
28 28
 }
29 29
 
Please login to merge, or discard this patch.
lib/midcom/helper/imagepopup/handler/list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         midcom::get()->auth->require_valid_user();
37 37
         midcom::get()->skip_page_style = true;
38 38
 
39
-        $this->add_stylesheet(MIDCOM_STATIC_URL ."/midcom.helper.imagepopup/styling.css", 'screen');
39
+        $this->add_stylesheet(MIDCOM_STATIC_URL . "/midcom.helper.imagepopup/styling.css", 'screen');
40 40
 
41 41
         $data['filetype'] = $args[0];
42 42
         $data['object'] = null;
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/type/tinymce.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         parent::configureOptions($resolver);
46 46
 
47
-        $map_attr = function (Options $options, $value) {
47
+        $map_attr = function(Options $options, $value) {
48 48
             if ($value === null) {
49 49
                 $value = array();
50 50
             }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             return $value;
55 55
         };
56 56
 
57
-        $get_config = function (Options $options, $value) {
57
+        $get_config = function(Options $options, $value) {
58 58
             return \midcom_baseclasses_components_configuration::get('midcom.helper.datamanager2', 'config');
59 59
         };
60 60
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             'config' => $get_config
64 64
         ));
65 65
 
66
-        $resolver->setNormalizer('widget_config', function (Options $options, $value) {
66
+        $resolver->setNormalizer('widget_config', function(Options $options, $value) {
67 67
             $widget_defaults = array(
68 68
                 'mode' => 'exact',
69 69
                 'theme' => $options['config']->get('tinymce_default_theme'),
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             );
74 74
             return helper::resolve_options($widget_defaults, $value);
75 75
         });
76
-        $resolver->setNormalizer('type_config', function (Options $options, $value) {
76
+        $resolver->setNormalizer('type_config', function(Options $options, $value) {
77 77
             $type_defaults = array(
78 78
 
79 79
             );
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             'elements' => $view->vars['id'],
107 107
             'local_config' => $options['widget_config']['local_config'],
108 108
             'language' => midcom::get()->i18n->get_current_language(),
109
-            'img' => ($options['widget_config']['use_imagepopup'])? $this->_get_image_popup($form) : '',
109
+            'img' => ($options['widget_config']['use_imagepopup']) ? $this->_get_image_popup($form) : '',
110 110
         );
111 111
         $snippet = $this->_get_snippet($tiny_options);
112 112
         $view->vars['tinymce_snippet'] = $snippet;
Please login to merge, or discard this patch.