NegativeTonePhrase
Represents phrases that may not contribute to the health of a conversation, due to a negative tone.
This is not contradicting someone or expressing a different viewpoint: it is a way of speaking that could lead to a less constructive conversation.
The CommentScore class holds an array of negative tone phrases. Each one is an instance of this class.
- Full name:
\Respectify\NegativeTonePhrase
See Also:
- CommentScore - The comment score includes an array of potential negative tone phrases.
Properties
quotedNegativeTonePhrase
A quote from the comment that may contain phrasing that isn't constructive for the conversation.
public string $quotedNegativeTonePhrase
explanation
Explanation of why the quoted text is not healthy for the conversation.
public string $explanation
suggestedRewrite
Suggested rewrite to avoid the negative tone.
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
NegativeTonePhrase 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 negative tone phrase, coming from JSON. |