| 1 | <?php |
||
| 9 | final class SpamDecideScore |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var int |
||
| 14 | */ |
||
| 15 | private $ham; |
||
| 16 | /** |
||
| 17 | * @var int |
||
| 18 | */ |
||
| 19 | private $spam; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * SpamDecideScore constructor. |
||
| 23 | * @param int $ham |
||
| 24 | * @param int $spam |
||
| 25 | */ |
||
| 26 | public function __construct(int $ham, int $spam) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param int $score |
||
| 34 | * @return bool |
||
| 35 | */ |
||
| 36 | public function isHam(int $score): bool |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param int $score |
||
| 43 | * @return bool |
||
| 44 | */ |
||
| 45 | public function isSpam(int $score): bool |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param int $score |
||
| 52 | * @return bool |
||
| 53 | */ |
||
| 54 | public function isLikelySpam(int $score): bool |
||
| 58 | |||
| 59 | } |