@@ -27,8 +27,7 @@ discard block |
||
27 | 27 | public function setVerifierMail() { |
28 | 28 | if (filter_var($this->mail, FILTER_VALIDATE_EMAIL)) { |
29 | 29 | return true; |
30 | - } |
|
31 | - else { |
|
30 | + } else { |
|
32 | 31 | return false; |
33 | 32 | } |
34 | 33 | } |
@@ -45,7 +44,9 @@ discard block |
||
45 | 44 | //on récupere le mail du site |
46 | 45 | $config = new \core\Configuration(); |
47 | 46 | |
48 | - if ($from == null) $from = $config->getMailSite(); |
|
47 | + if ($from == null) { |
|
48 | + $from = $config->getMailSite(); |
|
49 | + } |
|
49 | 50 | |
50 | 51 | $headers = 'Content-type: text/html; charset=utf-8'."\r\n"; |
51 | 52 | $headers .= "From: ".$from; |
@@ -53,15 +54,13 @@ discard block |
||
53 | 54 | //si pas de destinataire on envoi le mail au gérant du site car c'est un mail envoyé par le site lui même |
54 | 55 | if (($destinataire == null) && ($this->mail == null)) { |
55 | 56 | $destinataire = $config->getMailSite(); |
56 | - } |
|
57 | - else if ($destinataire == null) { |
|
57 | + } else if ($destinataire == null) { |
|
58 | 58 | $destinataire = $this->mail; |
59 | 59 | } |
60 | 60 | |
61 | 61 | if (mail($destinataire, $sujet, $message, $headers)) { |
62 | 62 | return true; |
63 | - } |
|
64 | - else { |
|
63 | + } else { |
|
65 | 64 | return false; |
66 | 65 | } |
67 | 66 | } |
@@ -210,13 +210,13 @@ |
||
210 | 210 | * @param string $savePath |
211 | 211 | * @param string $imageQuality |
212 | 212 | */ |
213 | - public function saveImage($savePath, $imageQuality="100") |
|
213 | + public function saveImage($savePath, $imageQuality = "100") |
|
214 | 214 | { |
215 | 215 | // *** Get extension |
216 | 216 | $extension = strrchr($savePath, '.'); |
217 | 217 | $extension = strtolower($extension); |
218 | 218 | |
219 | - switch($extension) |
|
219 | + switch ($extension) |
|
220 | 220 | { |
221 | 221 | case '.jpg': |
222 | 222 | case '.jpeg': |