@@ -29,14 +29,11 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | if($type === 'int' || $type === 'integer') { |
| 31 | 31 | $filterType = FILTER_VALIDATE_INT; |
| 32 | - } |
|
| 33 | - elseif($type === 'float' || $type === 'double') { |
|
| 32 | + } elseif($type === 'float' || $type === 'double') { |
|
| 34 | 33 | $filterType = FILTER_VALIDATE_FLOAT; |
| 35 | - } |
|
| 36 | - elseif($type === 'bool' || $type === 'boolean') { |
|
| 34 | + } elseif($type === 'bool' || $type === 'boolean') { |
|
| 37 | 35 | $filterType = FILTER_VALIDATE_BOOLEAN; |
| 38 | - } |
|
| 39 | - elseif($type === 'email') { |
|
| 36 | + } elseif($type === 'email') { |
|
| 40 | 37 | $filterType = FILTER_VALIDATE_EMAIL; |
| 41 | 38 | } |
| 42 | 39 | //--- FIN Gestion de type de data --- |
@@ -65,8 +62,7 @@ discard block |
||
| 65 | 62 | |
| 66 | 63 | try { |
| 67 | 64 | return securiseKnownTypes($data, $type); |
| 68 | - } |
|
| 69 | - catch(Exception $ex) { |
|
| 65 | + } catch(Exception $ex) { |
|
| 70 | 66 | if($ex->getMessage() !== 'Unknown type') { |
| 71 | 67 | throw new Exception($ex->getCode(), $ex->getMessage()); |
| 72 | 68 | } |
@@ -115,8 +115,7 @@ |
||
| 115 | 115 | |
| 116 | 116 | if($type === 'txt') { |
| 117 | 117 | return $colorList[$color] + 30; |
| 118 | - } |
|
| 119 | - elseif($type === 'bg') { |
|
| 118 | + } elseif($type === 'bg') { |
|
| 120 | 119 | return $colorList[$color] + 40; |
| 121 | 120 | } |
| 122 | 121 | |
@@ -121,11 +121,9 @@ |
||
| 121 | 121 | |
| 122 | 122 | if(!empty($serverHttps) && $serverHttps !== 'off') { |
| 123 | 123 | $this->ssl = true; |
| 124 | - } |
|
| 125 | - elseif(!empty($fwdProto) && $fwdProto === 'https') { |
|
| 124 | + } elseif(!empty($fwdProto) && $fwdProto === 'https') { |
|
| 126 | 125 | $this->ssl = true; |
| 127 | - } |
|
| 128 | - elseif(!empty($fwdSsl) && $fwdSsl === 'on') { |
|
| 126 | + } elseif(!empty($fwdSsl) && $fwdSsl === 'on') { |
|
| 129 | 127 | $this->ssl = true; |
| 130 | 128 | } |
| 131 | 129 | } |
@@ -111,11 +111,9 @@ |
||
| 111 | 111 | if(is_array($args) || is_object($args)) { |
| 112 | 112 | echo gettype($args); |
| 113 | 113 | |
| 114 | - } |
|
| 115 | - elseif(is_null($args)) { |
|
| 114 | + } elseif(is_null($args)) { |
|
| 116 | 115 | echo 'null'; |
| 117 | - } |
|
| 118 | - else { |
|
| 116 | + } else { |
|
| 119 | 117 | echo htmlentities($args); |
| 120 | 118 | } |
| 121 | 119 | } |