Passed
Push — 1.0.0-dev ( 83bedf...ceb5d8 )
by nguereza
02:34
created
core/libraries/Browser.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -916,27 +916,27 @@  discard block
 block discarded – undo
916 916
                 if (isset($aresult[1])) {
917 917
                     $this->setBrowser(self::BROWSER_IE);
918 918
                     $this->setVersion(str_replace(array('(', ')', ';'), '', $aresult[1]));
919
-                    if(preg_match('#trident/([0-9\.]+);#i', $this->_agent, $aresult)){
920
-                        if($aresult[1] == '3.1'){
919
+                    if (preg_match('#trident/([0-9\.]+);#i', $this->_agent, $aresult)) {
920
+                        if ($aresult[1] == '3.1') {
921 921
                             $this->setVersion('7.0');
922 922
                         }
923
-                        else if($aresult[1] == '4.0'){
923
+                        else if ($aresult[1] == '4.0') {
924 924
                             $this->setVersion('8.0');
925 925
                         }
926
-                        else if($aresult[1] == '5.0'){
926
+                        else if ($aresult[1] == '5.0') {
927 927
                             $this->setVersion('9.0');
928 928
                         }
929
-                        else if($aresult[1] == '6.0'){
929
+                        else if ($aresult[1] == '6.0') {
930 930
                             $this->setVersion('10.0');
931 931
                         }
932
-                        else if($aresult[1] == '7.0'){
932
+                        else if ($aresult[1] == '7.0') {
933 933
                             $this->setVersion('11.0');
934 934
                         }
935
-                        else if($aresult[1] == '8.0'){
935
+                        else if ($aresult[1] == '8.0') {
936 936
                             $this->setVersion('11.0');
937 937
                         }
938 938
                     }
939
-                    if(stripos($this->_agent, 'IEMobile') !== false) {
939
+                    if (stripos($this->_agent, 'IEMobile') !== false) {
940 940
                         $this->setBrowser(self::BROWSER_POCKET_IE);
941 941
                         $this->setMobile(true);
942 942
                     }
@@ -1676,7 +1676,7 @@  discard block
 block discarded – undo
1676 1676
               'mac' => self::PLATFORM_APPLE,
1677 1677
               'android' => self::PLATFORM_ANDROID,
1678 1678
               'Silk' => self::PLATFORM_FIRE_OS,
1679
-              'linux_smarttv' => self::PLATFORM_LINUX .'/'.self::PLATFORM_SMART_TV,
1679
+              'linux_smarttv' => self::PLATFORM_LINUX . '/' . self::PLATFORM_SMART_TV,
1680 1680
               'linux' => self::PLATFORM_LINUX,
1681 1681
               'Nokia' => self::PLATFORM_NOKIA,
1682 1682
               'BlackBerry' => self::PLATFORM_BLACKBERRY,
@@ -1700,9 +1700,9 @@  discard block
 block discarded – undo
1700 1700
             );
1701 1701
 
1702 1702
             foreach ($platformMaps as $name => $value) {
1703
-                if($name == 'linux_smarttv' 
1703
+                if ($name == 'linux_smarttv' 
1704 1704
                     && stripos($this->_agent, 'linux') !== false 
1705
-                    && stripos($this->_agent, 'SMART-TV') !== false ){
1705
+                    && stripos($this->_agent, 'SMART-TV') !== false) {
1706 1706
                         $this->_platform = $value;
1707 1707
                         break;
1708 1708
                 } elseif (stripos($this->_agent, $name) !== false) {
Please login to merge, or discard this patch.
core/functions/function_string.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 *  @filesource
40 40
 	 */
41 41
 
42
-	if(! function_exists('get_random_string')){
42
+	if (!function_exists('get_random_string')) {
43 43
 		/**
44 44
 		 * Generate a random string
45 45
 		 * @param  string $type the type of generation. It can take the values: "alpha" for alphabetic characters,
@@ -49,21 +49,21 @@  discard block
 block discarded – undo
49 49
 		 * @param  boolean $lower if we return the generated string in lowercase (true). By default it's false.
50 50
 		 * @return string the generated string.
51 51
 		 */
52
-		function get_random_string($type = 'alnum', $length = 10, $lower = false){
52
+		function get_random_string($type = 'alnum', $length = 10, $lower = false) {
53 53
 			$chars = array(
54 54
 							'alpha' => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
55 55
 							'alnum' => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890',
56 56
 							'num' => '1234567890'
57 57
 						);
58 58
 			$str = null;
59
-			if(isset($chars[$type])){
59
+			if (isset($chars[$type])) {
60 60
 				$str = $chars[$type];
61 61
 			}
62 62
 			$random = null;
63
-			for($i = 0; $i < $length; $i++){
63
+			for ($i = 0; $i < $length; $i++) {
64 64
 				$random .= $str[mt_rand() % strlen($str)];
65 65
 			}
66
-			if($lower){
66
+			if ($lower) {
67 67
 				$random = strtolower($random);
68 68
 			}
69 69
 			return $random;
Please login to merge, or discard this patch.