Passed
Branch master (95796a)
by Andreas
38:22
created
src/midcom/datamanager/extension/type/toolbar.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@
 block discarded – undo
65 65
                     //@todo Move to template?
66 66
                     $attributes['attr']['accesskey'] = 's';
67 67
                     $attributes['attr']['class'] .= ' save_' . $key;
68
-                }
69
-                else if ($operation == controller::CANCEL)
68
+                } else if ($operation == controller::CANCEL)
70 69
                 {
71 70
                     //@todo Move to template?
72 71
                     $attributes['attr']['accesskey'] = 'd';
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/transformer/jsdate.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@  discard block
 block discarded – undo
45 45
         if ($this->config['type_config']['storage_type'] === datetype::UNIXTIME)
46 46
         {
47 47
             $date->setTimestamp($input);
48
-        }
49
-        else if ($this->config['type_config']['storage_type'] === datetype::ISO)
48
+        } else if ($this->config['type_config']['storage_type'] === datetype::ISO)
50 49
         {
51 50
             $date->modify($input);
52 51
         }
@@ -79,8 +78,7 @@  discard block
 block discarded – undo
79 78
         if ($this->config['type_config']['storage_type'] === datetype::UNIXTIME)
80 79
         {
81 80
             return $array['date']->format('U');
82
-        }
83
-        else if ($this->config['type_config']['storage_type'] === datetype::ISO)
81
+        } else if ($this->config['type_config']['storage_type'] === datetype::ISO)
84 82
         {
85 83
             return $array['date']->format('Y-m-d H:i:s');
86 84
         }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/transformer/photo.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,13 +25,11 @@
 block discarded – undo
25 25
             {
26 26
                 //This is converting from storage
27 27
                 $result[$key] = $this->transform_persistent($value);
28
-            }
29
-            else if (!empty($value['object']))
28
+            } else if (!empty($value['object']))
30 29
             {
31 30
                 //This is during validation errors
32 31
                 $result[$key] = $this->transform_persistent($value['object']);
33
-            }
34
-            else if ($value !== null)
32
+            } else if ($value !== null)
35 33
             {
36 34
                 $result[$key] = $this->transform_nonpersistent(array('file' => $value, 'identifier' => 'archival'));
37 35
             }
Please login to merge, or discard this patch.
src/midcom/datamanager/storage/blobs.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@  discard block
 block discarded – undo
40 40
             try
41 41
             {
42 42
                 $results[$identifier] = new midcom_db_attachment($guid);
43
-            }
44
-            catch (midcom_error $e)
43
+            } catch (midcom_error $e)
45 44
             {
46 45
                 $e->log();
47 46
             }
@@ -77,8 +76,7 @@  discard block
 block discarded – undo
77 76
                         {
78 77
                             $identifier = md5(time() . $data['file']['name'] . $data['file']['tmp_name']);
79 78
                         }
80
-                    }
81
-                    else
79
+                    } else
82 80
                     {
83 81
                         if ($attachment->name != $filename)
84 82
                         {
@@ -92,8 +90,7 @@  discard block
 block discarded – undo
92 90
                     {
93 91
                         throw new midcom_error('Failed to copy attachment: ' . midcom_connection::get_error_string());
94 92
                     }
95
-                }
96
-                else if ($attachment === null)
93
+                } else if ($attachment === null)
97 94
                 {
98 95
                     continue;
99 96
                 }
Please login to merge, or discard this patch.
src/midcom/datamanager/storage/photo.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@
 block discarded – undo
54 54
             }
55 55
 
56 56
             return $this->save_attachment_list();
57
-        }
58
-        elseif (!empty($this->value['delete']))
57
+        } elseif (!empty($this->value['delete']))
59 58
         {
60 59
             $this->map = array();
61 60
             return $this->save_attachment_list();
Please login to merge, or discard this patch.
lib/org/routamc/positioning/exec/test-userlocation.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,14 +20,12 @@
 block discarded – undo
20 20
 {
21 21
     printf('You\'re in %s, %s', $user_location['latitude'], $user_location['longitude']);
22 22
     // Will print "You're in 60.2345, 25.00456"
23
-}
24
-else
23
+} else
25 24
 {
26 25
     if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1')
27 26
     {
28 27
         echo "You're here";
29
-    }
30
-    else
28
+    } else
31 29
     {
32 30
         echo "No location found";
33 31
     }
Please login to merge, or discard this patch.
lib/org/routamc/positioning/exec/geolocation-json.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,16 +18,13 @@
 block discarded – undo
18 18
         {
19 19
             // Exact enough
20 20
             $location_array['accuracy'] = org_routamc_positioning_log_dba::ACCURACY_GPS;
21
-        }
22
-        elseif ($_POST['accuracy'] < 400)
21
+        } elseif ($_POST['accuracy'] < 400)
23 22
         {
24 23
             $location_array['accuracy'] = org_routamc_positioning_log_dba::ACCURACY_STREET;
25
-        }
26
-        elseif ($_POST['accuracy'] < 5000)
24
+        } elseif ($_POST['accuracy'] < 5000)
27 25
         {
28 26
             $location_array['accuracy'] = org_routamc_positioning_log_dba::ACCURACY_CITY;
29
-        }
30
-        else
27
+        } else
31 28
         {
32 29
             // Fall back to "state level"
33 30
             $location_array['accuracy'] = 50;
Please login to merge, or discard this patch.
lib/org/routamc/positioning/exec/import-cities.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,8 +100,7 @@  discard block
 block discarded – undo
100 100
             echo "<span style=\"color: #00cc00;\">Success,</span> ";
101 101
             $imported_cities["{$new_city->country}:{$data[3]}:{$new_city->city}"] = true;
102 102
             $cities_created++;
103
-        }
104
-        else
103
+        } else
105 104
         {
106 105
             echo "<span style=\"color: #cc0000;\">FAILED</span>, ";
107 106
         }
@@ -110,8 +109,7 @@  discard block
 block discarded – undo
110 109
     }
111 110
 
112 111
     echo "<p>{$cities_created} cities imported.</p>\n";
113
-}
114
-else
112
+} else
115 113
 {
116 114
     ?>
117 115
     <h1>World Cities Database installation</h1>
Please login to merge, or discard this patch.
lib/org/routamc/positioning/dm2/widget.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -303,8 +303,7 @@  discard block
 block discarded – undo
303 303
             {
304 304
                 $city = new org_routamc_positioning_city_dba($city_id);
305 305
                 $city_name = $city->city;
306
-            }
307
-            catch (midcom_error $e){}
306
+            } catch (midcom_error $e){}
308 307
         }
309 308
         return $city_name;
310 309
     }
@@ -495,8 +494,7 @@  discard block
 block discarded – undo
495 494
         {
496 495
             $city = new org_routamc_positioning_city_dba($this->_type->location->city);
497 496
             $city_name = $city->city;
498
-        }
499
-        catch (midcom_error $e)
497
+        } catch (midcom_error $e)
500 498
         {
501 499
             $city_name = '';
502 500
         }
@@ -546,8 +544,7 @@  discard block
 block discarded – undo
546 544
             && $city->id)
547 545
         {
548 546
             $city_id = $city->id;
549
-        }
550
-        else if (! empty($results))
547
+        } else if (! empty($results))
551 548
         {
552 549
             $city = new org_routamc_positioning_city_dba();
553 550
             $city->city = $city_name;
Please login to merge, or discard this patch.