Google\Cloud\Vision\Annotation\SafeSearch::isViolent PHP Method

isViolent() public method

Example: if ($safeSearch->isViolent()) { echo "Image contains violent content."; }
public isViolent ( string $strength = self::STRENGTH_LOW ) : boolean
$strength string [optional] Value should be one of "low", "medium" or "high". Recommended usage is via `Face::STRENGTH_*` constants. Higher strength will result in fewer `true` results, but fewer false positives. **Defaults to** `"low"`.
return boolean
    public function isViolent($strength = self::STRENGTH_LOW)
    {
        return $this->likelihood($this->info['violence'], $strength);
    }