Commit d5aeeb74 authored by Marcelo Rivera's avatar Marcelo Rivera

(fix): 1 = safe; 2 = open

1 merge request!235WIP: Boost Campaigns (&24)
Pipeline #71911131 passed with stages
in 10 minutes and 26 seconds
......@@ -82,6 +82,11 @@ class Campaign implements JsonSerializable
/** @var string */
const COMPLETED_STATUS = 'completed';
/** @var int */
const SAFE_RATING = 1;
/** @var int */
const OPEN_RATING = 2;
/** @var string */
protected $urn;
......@@ -211,7 +216,7 @@ class Campaign implements JsonSerializable
public function setNsfw($value)
{
$this->nsfw = $value;
$this->setRating(count($this->getNsfw()) > 0 ? 0 : 1); // 0 = open; 1 = safe
$this->setRating(count($this->getNsfw()) > 0 ? static::OPEN_RATING : static::SAFE_RATING); // 2 = open; 1 = safe
return $this;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment