getAttribute('visible') != self::VISIBLE_YES) { throw new \InvalidArgumentException(sprintf('Torrent: %s is not visible.', $this->id)); } if (in_array('banned', $fields) && $this->getAttribute('banned') == self::BANNED_YES) { throw new \InvalidArgumentException(sprintf('Torrent: %s is banned.', $this->id)); } return true; } }