class BooleanAnswer extends Answer

Methods

array
toArray()

Get the instance as an array.

array
jsonSerialize()

Get the JSON serializable representation of the instance.

from  Answer
__construct(float $probability)

Create a new boolean answer instance.

bool
isTrue(float $threshold = 0.5)

Determine if the probability meets the given threshold.

Details

at line 30
array toArray()

Get the instance as an array.

Return Value

array

in Answer at line 20
array jsonSerialize()

Get the JSON serializable representation of the instance.

Return Value

array

at line 14
__construct(float $probability)

Create a new boolean answer instance.

Parameters

float $probability

the probability that the answer is "true"

at line 22
bool isTrue(float $threshold = 0.5)

Determine if the probability meets the given threshold.

Parameters

float $threshold

Return Value

bool