Passed
Push — master ( f04050...851437 )
by Greg
03:30
created
src/GJClasses/Detect.php 1 patch
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,12 +8,24 @@
 block discarded – undo
8 8
         // The order of the below user agent checks matters
9 9
         // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#browser_name
10 10
         $agent_string = strtolower($_SERVER['HTTP_USER_AGENT']);
11
-        if (strpos($agent_string, 'chromium')) return 'chromium';
12
-        if (strpos($agent_string, 'opr/')) return 'opera';
13
-        if (strpos($agent_string, 'chrome')) return 'chrome';
14
-        if (strpos($agent_string, 'seamonkey')) return 'seamonkey';
15
-        if (strpos($agent_string, 'firefox')) return 'firefox';
16
-        if (strpos($agent_string, 'version/')) return 'safari';
11
+        if (strpos($agent_string, 'chromium')) {
12
+            return 'chromium';
13
+        }
14
+        if (strpos($agent_string, 'opr/')) {
15
+            return 'opera';
16
+        }
17
+        if (strpos($agent_string, 'chrome')) {
18
+            return 'chrome';
19
+        }
20
+        if (strpos($agent_string, 'seamonkey')) {
21
+            return 'seamonkey';
22
+        }
23
+        if (strpos($agent_string, 'firefox')) {
24
+            return 'firefox';
25
+        }
26
+        if (strpos($agent_string, 'version/')) {
27
+            return 'safari';
28
+        }
17 29
         return '';
18 30
     }
19 31
 
Please login to merge, or discard this patch.