Skip to content

Latest commit

 

History

History
executable file
·
33 lines (27 loc) · 660 Bytes

README.md

File metadata and controls

executable file
·
33 lines (27 loc) · 660 Bytes

Explained Condition

  • Example
$conditionList = ConditionList::AND([
    'Likes vegetables' => true,
    'Likes at least one fruit' => ConditionList::OR([
        'Banana' => true,
        'Apple' => false
    ])
]);

// Condition result
$conditionList->isTrue();
$conditionList->isFalse();

// Pretty prints
$conditionList->getResolvedExplanations();
$conditionList->stringifyResolvedConditions();
$conditionList->stringifyResolvedAcceptations();
$conditionList->stringifyResolvedRejections();
  • Output (with stringifyResolvedConditions)
Likes vegetables : ✅
AND Likes at least one fruit : ✅
_____Banana : ✅
_____OR Apple : ❌