| 1 | <?php |
||
| 19 | class EmailWithLinkMatcher implements EmailMatcher { |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $url_pattern; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $url_pattern |
||
|
|
|||
| 28 | */ |
||
| 29 | public function __construct($url_pattern = NULL) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * {@inheritdoc} |
||
| 36 | */ |
||
| 37 | public function matches(Email $email) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | public function __toString() |
||
| 58 | |||
| 59 | } |
||
| 60 |
This check looks for
@paramannotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.