for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Genkgo\Mail\Protocol\Smtp;
/**
* Class SpamDecideScore
* @package Genkgo\Mail\Protocol\Smtp
*/
final class SpamDecideScore
{
* @var int
private $ham;
private $spam;
* SpamDecideScore constructor.
* @param int $ham
* @param int $spam
public function __construct(int $ham, int $spam)
$this->ham = $ham;
$this->spam = $spam;
}
* @param int $score
* @return bool
public function isHam(int $score): bool
return $this->ham >= $score;
public function isSpam(int $score): bool
return $this->spam <= $score;
public function isLikelySpam(int $score): bool
return $this->ham < $score && $this->spam > $score;