Test Failed
Branch master (8d1702)
by Andreas
11:03
created
lib/org/openpsa/contacts/midcom/interfaces.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
 
79 79
     public function resolve_object_link(midcom_db_topic $topic, midcom_core_dbaobject $object)
80 80
     {
81
-        if (   $object instanceof org_openpsa_contacts_group_dba
81
+        if ($object instanceof org_openpsa_contacts_group_dba
82 82
             || $object instanceof midcom_db_group) {
83 83
             return "group/{$object->guid}/";
84 84
         }
85
-        if (   $object instanceof org_openpsa_contacts_person_dba
85
+        if ($object instanceof org_openpsa_contacts_person_dba
86 86
             || $object instanceof midcom_db_person) {
87 87
             return "person/{$object->guid}/";
88 88
         }
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
             // We have a feed URL, but we should check if it is GeoRSS as well
112 112
             $items = net_nemein_rss_fetch::raw_fetch($data['rss_url'])->get_items();
113 113
 
114
-            if (   count($items) > 0
115
-                && (   $items[0]->get_latitude()
114
+            if (count($items) > 0
115
+                && ($items[0]->get_latitude()
116 116
                     || $items[0]->get_longitude())) {
117 117
                 // This is a GeoRSS feed
118 118
                 $data['georss_url'] = $data['rss_url'];
@@ -175,14 +175,14 @@  discard block
 block discarded – undo
175 175
         $data = $this->_get_data_from_url($group->homepage);
176 176
 
177 177
         // Use the data we got
178
-        if (   midcom::get()->componentloader->is_installed('org.routamc.positioning')
178
+        if (midcom::get()->componentloader->is_installed('org.routamc.positioning')
179 179
             && array_key_exists('icbm', $data)) {
180 180
             // We know where the group is located
181 181
             $icbm_parts = explode(',', $data['icbm']);
182 182
             if (count($icbm_parts) == 2) {
183 183
                 $latitude = (float) $icbm_parts[0];
184 184
                 $longitude = (float) $icbm_parts[1];
185
-                if (   abs($latitude) < 90
185
+                if (abs($latitude) < 90
186 186
                     && abs($longitude) < 180) {
187 187
                     $location = new org_routamc_positioning_location_dba();
188 188
                     $location->date = time();
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,8 @@
 block discarded – undo
159 159
 
160 160
         try {
161 161
             $object = new $classname($guid);
162
-        } catch (midcom_error $e) {
162
+        }
163
+        catch (midcom_error $e) {
163 164
             $handler->print_error($type . " {$guid} not found, error " . $e->getMessage());
164 165
             return false;
165 166
         }
Please login to merge, or discard this patch.
src/midcom/datamanager/schema.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,15 +142,15 @@
 block discarded – undo
142 142
             'end_fieldset' => null
143 143
         ));
144 144
 
145
-        $normalize_widget = function (Options $options, $value) {
146
-            if (   $value == 'images'
145
+        $normalize_widget = function(Options $options, $value) {
146
+            if ($value == 'images'
147 147
                 || $value == 'downloads') {
148 148
                 return 'subform';
149 149
             }
150 150
             return $value;
151 151
         };
152 152
 
153
-        $normalize_storage = function (Options $options, $value) use ($name) {
153
+        $normalize_storage = function(Options $options, $value) use ($name) {
154 154
             $default = array(
155 155
                 'location' => 'parameter',
156 156
                 'domain' => 'midcom.helper.datamanager2',
Please login to merge, or discard this patch.
lib/org/openpsa/products/handler/list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
             $this->datamanager = new midcom_helper_datamanager2_datamanager($data['schemadb_group']);
125 125
             if (midcom::get()->config->get('enable_ajax_editing')) {
126 126
                 $this->controller = midcom_helper_datamanager2_controller::create('ajax');
127
-                $this->controller->schemadb =& $data['schemadb_group'];
127
+                $this->controller->schemadb = & $data['schemadb_group'];
128 128
                 $this->controller->set_storage($data['group']);
129 129
                 $this->controller->process_ajax();
130 130
                 $this->datamanager = $this->controller->datamanager;
Please login to merge, or discard this patch.
lib/net/nemein/tag/tag.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     public function _on_creating()
44 44
     {
45
-        return (   $this->validate_tag($this->tag)
45
+        return ($this->validate_tag($this->tag)
46 46
                 && $this->_check_duplicates() == 0);
47 47
     }
48 48
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             midcom::get()->uimessages->add(midcom::get()->i18n->get_string('net.nemein.tag', 'net.nemein.tag'), sprintf(midcom::get()->i18n->get_string('tag "%s" is not valid. tags may not be numeric', 'net.nemein.tag'), $tag), 'info');
67 67
             return false;
68 68
         }
69
-        if (   strstr($tag, '"')
69
+        if (strstr($tag, '"')
70 70
             || strstr($tag, "'")) {
71 71
             midcom::get()->uimessages->add(midcom::get()->i18n->get_string('net.nemein.tag', 'net.nemein.tag'), sprintf(midcom::get()->i18n->get_string('tag "%s" is not valid. tags may not contain quotes', 'net.nemein.tag'), $tag), 'info');
72 72
             return false;
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
     public function _on_updating()
79 79
     {
80
-        return (   $this->validate_tag($this->tag)
80
+        return ($this->validate_tag($this->tag)
81 81
                 && $this->_check_duplicates() == 0);
82 82
     }
83 83
 
Please login to merge, or discard this patch.
lib/net/nemein/tag/exec/merge.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 <h1>Merge tags</h1>
5 5
 
6 6
 <?php
7
-if (   isset($_POST['from'])
7
+if (isset($_POST['from'])
8 8
     && isset($_POST['to'])) {
9 9
     if (net_nemein_tag_handler::merge_tags($_POST['from'], $_POST['to'])) {
10 10
         echo "<p>Successfully merged tag \"{$_POST['from']}\" to \"{$_POST['to']}\"</p>\n";
Please login to merge, or discard this patch.
lib/net/nemein/redirector/handler/tinyurl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         $this->_tinyurl->node = $this->_topic->guid;
53 53
 
54 54
         if (!$this->_tinyurl->create()) {
55
-            throw new midcom_error('Failed to create a new TinyURL object. Last Midgard error was: '. midcom_connection::get_error_string());
55
+            throw new midcom_error('Failed to create a new TinyURL object. Last Midgard error was: ' . midcom_connection::get_error_string());
56 56
         }
57 57
 
58 58
         return $this->_tinyurl;
Please login to merge, or discard this patch.
lib/net/nemein/wiki/midcom/interfaces.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
     public function resolve_object_link(midcom_db_topic $topic, midcom_core_dbaobject $object)
43 43
     {
44
-        if (   $object instanceof midcom_db_article
44
+        if ($object instanceof midcom_db_article
45 45
             && $topic->id == $object->topic) {
46 46
             if ($object->name == 'index') {
47 47
                 return '';
Please login to merge, or discard this patch.
lib/net/nemein/wiki/handler/edit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
     {
63 63
         $this->_load_schemadb();
64 64
         $this->_controller = midcom_helper_datamanager2_controller::create('simple');
65
-        $this->_controller->schemadb =& $this->_schemadb;
65
+        $this->_controller->schemadb = & $this->_schemadb;
66 66
         $this->_controller->set_storage($this->_page);
67 67
         if (!$this->_controller->initialize()) {
68 68
             throw new midcom_error("Failed to initialize a DM2 controller instance for article {$this->_article->id}.");
Please login to merge, or discard this patch.
lib/net/nemein/wiki/handler/feed.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,8 @@
 block discarded – undo
66 66
             try {
67 67
                 $author = new midcom_db_person($wikipage->metadata->revisor);
68 68
                 $item->author = $author->name;
69
-            } catch (midcom_error $e) {
69
+            }
70
+            catch (midcom_error $e) {
70 71
                 $e->log();
71 72
             }
72 73
 
Please login to merge, or discard this patch.