ObjectionablePhrase
Represents an objectionable phrase identified in a comment. This is a potentially rude, offensive, etc term or phrase.
The CommentScore class holds an array of objectionable phrases. Each one is an instance of this class.
- Full name:
\Respectify\ObjectionablePhrase
See Also:
- CommentScore - The comment score includes an array of potential objectionable phrases.
Properties
quotedObjectionablePhrase
The part of the comment that may contain an objectionable phrase.
public string $quotedObjectionablePhrase
explanation
Explanation of why the phrase is objectionable.
public string $explanation
suggestedRewrite
Suggested rewrite to avoid the objectionable phrase.
This is only rarely present, and only if Respectify is very certain what the intent is and how to rewrite it.
public string $suggestedRewrite
Methods
__construct
ObjectionablePhrase constructor. You should never need to call this. It is created internally by the Respectify client class when it gets a response.
public __construct(array $data): mixed
Parameters:
| Parameter | Type | Description |
|---|---|---|
$data | array | The data to initialize the objectionable phrase, coming from JSON. |