| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function validate() : bool |
||
| 14 | { |
||
| 15 | if($this->hasScheme() || $this->isFragmentOnly()) { |
||
| 16 | return true; |
||
| 17 | } |
||
| 18 | |||
| 19 | // no scheme found: it may be an email address without the mailto: |
||
| 20 | // It can't be a variable, since without the scheme it would already |
||
| 21 | // have been recognized as a variable only link. |
||
| 22 | $this->parser->setError( |
||
| 23 | URLInfo::ERROR_MISSING_SCHEME, |
||
| 24 | t('Cannot determine the link\'s scheme, e.g. %1$s.', 'http') |
||
| 25 | ); |
||
| 26 | |||
| 27 | return false; |
||
| 28 | } |
||
| 30 |