| 1 | <?php |
||
| 8 | final class ForbiddenWordSpamScore implements SpamScoreInterface |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | private $words; |
||
| 15 | /** |
||
| 16 | * @var int |
||
| 17 | */ |
||
| 18 | private $pointsPerMatchedWord; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * ForbiddenWordSpamCheck constructor. |
||
| 22 | * @param array $words |
||
| 23 | * @param int $pointsPerMatchedWord |
||
| 24 | */ |
||
| 25 | public function __construct(array $words, int $pointsPerMatchedWord) |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param MessageInterface $message |
||
| 33 | * @return int |
||
| 34 | */ |
||
| 35 | public function calculate(MessageInterface $message): int |
||
| 47 | } |