@@ -22,13 +22,13 @@ |
||
| 22 | 22 | { |
| 23 | 23 | public function detect() : bool |
| 24 | 24 | { |
| 25 | - if($this->getScheme() === 'mailto') { |
|
| 25 | + if ($this->getScheme() === 'mailto') { |
|
| 26 | 26 | $this->setHostFromEmail((string)$this->getPath()); |
| 27 | 27 | $this->setTypeEmail(); |
| 28 | 28 | return true; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - if($this->hasPath() && preg_match(RegexHelper::REGEX_EMAIL, $this->getPath())) |
|
| 31 | + if ($this->hasPath() && preg_match(RegexHelper::REGEX_EMAIL, $this->getPath())) |
|
| 32 | 32 | { |
| 33 | 33 | $this->setHostFromEmail($this->getPath()); |
| 34 | 34 | $this->setSchemeMailto(); |
@@ -50,13 +50,11 @@ |
||
| 50 | 50 | { |
| 51 | 51 | return $value; |
| 52 | 52 | } |
| 53 | - } |
|
| 54 | - else if (is_array(json_decode($value, true, 512, JSON_THROW_ON_ERROR))) |
|
| 53 | + } else if (is_array(json_decode($value, true, 512, JSON_THROW_ON_ERROR))) |
|
| 55 | 54 | { |
| 56 | 55 | return $value; |
| 57 | 56 | } |
| 58 | - } |
|
| 59 | - catch (Throwable $e) |
|
| 57 | + } catch (Throwable $e) |
|
| 60 | 58 | { |
| 61 | 59 | // Invalid JSON must return an empty string. |
| 62 | 60 | // The application is responsible for asserting |