Passed
Push — master ( 79c331...ad8d78 )
by Andreas
13:52
created
lib/midgard/admin/asgard/handler/object/manage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -223,10 +223,10 @@
 block discarded – undo
223 223
             $new_type_reflector = midcom_helper_reflector::get($new_type);
224 224
             $link_properties = $new_type_reflector->get_link_properties();
225 225
             foreach ($link_properties as $property => $link) {
226
-                if (   ($link['class'] && midcom_helper_reflector::is_same_class($link['class'], $this->_object->__mgdschema_class_name__))
226
+                if (($link['class'] && midcom_helper_reflector::is_same_class($link['class'], $this->_object->__mgdschema_class_name__))
227 227
                     || $link['type'] == MGD_TYPE_GUID) {
228 228
                     $defaults[$property] = $this->_object->{$link['target']};
229
-                } elseif (   $property == $parent_property
229
+                } elseif ($property == $parent_property
230 230
                           && midcom_helper_reflector::is_same_class($new_type, $this->_object->__mgdschema_class_name__)) {
231 231
                     $defaults[$property] = $this->_object->$parent_property;
232 232
                 }
Please login to merge, or discard this patch.
lib/midcom/services/auth/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@
 block discarded – undo
221 221
             return true;
222 222
         }
223 223
         if ($user === null) {
224
-            $user =& $this->user;
224
+            $user = & $this->user;
225 225
         }
226 226
 
227 227
         if ($user == 'EVERYONE') {
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/person.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/midgard/admin/asgard/stylehelper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function __construct(array &$data)
24 24
     {
25
-        $this->_data =& $data;
25
+        $this->_data = & $data;
26 26
         midcom::get()->head->enable_jquery_ui(['accordion']);
27 27
     }
28 28
 
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
             return;
33 33
         }
34 34
 
35
-        if (   midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_style')
36
-            && (   $this->_data['handler_id'] !== 'object_create'
35
+        if (midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_style')
36
+            && ($this->_data['handler_id'] !== 'object_create'
37 37
                 || $this->_data['current_type'] == 'midgard_element')) {
38 38
             // Suggest element names to create under a style
39 39
             $this->_data['help_style_elementnames'] = $this->_get_style_elements_and_nodes($this->_data['object']->id);
40 40
             midcom_show_style('midgard_admin_asgard_stylehelper_elementnames');
41 41
 
42
-        } elseif (   midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_element')
42
+        } elseif (midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_element')
43 43
                   && $this->_get_help_element()) {
44 44
             midcom_show_style('midgard_admin_asgard_stylehelper_element');
45 45
         }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     private function _get_help_element() : bool
49 49
     {
50
-        if (   empty($this->_data['object']->name)
50
+        if (empty($this->_data['object']->name)
51 51
             || empty($this->_data['object']->style)) {
52 52
             // We cannot help with empty elements
53 53
             return false;
Please login to merge, or discard this patch.
lib/net/nehmer/blog/handler/view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             ]);
49 49
         }
50 50
 
51
-        if (   $this->_article->topic === $this->_topic->id
51
+        if ($this->_article->topic === $this->_topic->id
52 52
             && $this->_article->can_do('midgard:delete')) {
53 53
             $delete = $this->get_workflow('delete', ['object' => $this->_article]);
54 54
             $buttons[] = $delete->get_button("delete/{$this->_article->guid}/");
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         if ($this->_config->get('comments_enable')) {
84 84
             if ($node = net_nehmer_comments_interface::get_node($this->_topic, $this->_config->get('comments_topic'))) {
85 85
                 $data['comments_url'] = $node[MIDCOM_NAV_RELATIVEURL] . "comment/{$this->_article->guid}";
86
-                if (   $this->_topic->can_do('midgard:update')
86
+                if ($this->_topic->can_do('midgard:update')
87 87
                     && $this->_topic->can_do('net.nehmer.comments:moderation')) {
88 88
                     net_nehmer_comments_viewer::add_head_elements();
89 89
                 }
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/midcom/interfaces.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function _on_watched_dba_delete(midcom_core_dbaobject $object)
18 18
     {
19 19
         $qb = org_openpsa_directmarketing_campaign_member_dba::new_query_builder();
20
-        if (   $object instanceof midcom_db_person
20
+        if ($object instanceof midcom_db_person
21 21
             || $object instanceof org_openpsa_contacts_person_dba) {
22 22
             $qb->add_constraint('person', '=', $object->id);
23 23
         } elseif ($object instanceof org_openpsa_directmarketing_campaign_dba) {
Please login to merge, or discard this patch.
lib/errors.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
             return;
141 141
         }
142 142
 
143
-        if (   !is_writable($config['filename'])
143
+        if (!is_writable($config['filename'])
144 144
             && !is_writable(dirname($config['filename']))) {
145 145
             debug_add("Error logging file {$config['filename']} is not writable", MIDCOM_LOG_WARN);
146 146
             return;
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
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
         $year_data = [];
132 132
         $first_post = $this->_compute_welcome_first_post();
133 133
         $this->_request_data['first_post'] = $first_post;
134
-        $this->_request_data['total_count'] =& $total_count;
135
-        $this->_request_data['year_data'] =& $year_data;
134
+        $this->_request_data['total_count'] = & $total_count;
135
+        $this->_request_data['year_data'] = & $year_data;
136 136
         if (!$first_post) {
137 137
             return;
138 138
         }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         switch ($handler_id) {
262 262
             case 'archive-year-category':
263 263
                 $category = trim(strip_tags($args[1]));
264
-                if (   $data['datamanager']->get_schema('default')->has_field('categories')
264
+                if ($data['datamanager']->get_schema('default')->has_field('categories')
265 265
                     && !$data['datamanager']->get_schema('default')->get_field('categories')['type_config']['allow_multiple']) {
266 266
                     $qb->add_constraint('extra1', '=', $category);
267 267
                 } else {
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
             throw new midcom_error_notfound("The year '{$year}' is not valid.");
346 346
         }
347 347
 
348
-        if (   $month < 1
348
+        if ($month < 1
349 349
             || $month > 12) {
350 350
             throw new midcom_error_notfound("The month {$month} is not valid.");
351 351
         }
Please login to merge, or discard this patch.
lib/org/openpsa/products/product/group.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
         $result_cache[$cache_key] = [];
77
-        $ret =& $result_cache[$cache_key];
77
+        $ret = & $result_cache[$cache_key];
78 78
 
79 79
         if (empty($up)) {
80 80
             // TODO: use reflection to see what kind of property this is ?
Please login to merge, or discard this patch.