1: <?php
2: namespace Pharborist\Types;
3:
4: use Pharborist\FormatterFactory;
5: use Pharborist\Namespaces\NameNode;
6:
7: 8: 9: 10: 11: 12:
13: class TrueNode extends BooleanNode {
14: 15: 16: 17: 18: 19: 20: 21:
22: public static function create($boolean = TRUE) {
23: $is_upper = FormatterFactory::getDefaultFormatter()->getConfig('boolean_null_upper');
24: $node = new TrueNode();
25: $node->addChild(NameNode::create($is_upper ? 'TRUE' : 'true'), 'constantName');
26: return $node;
27: }
28:
29: 30: 31: 32: 33:
34: public function toValue() {
35: return TRUE;
36: }
37: }
38: