@@ -20,6 +20,13 @@ trait ValueParserPart {
2020 'true ' => true
2121 ];
2222
23+ /**
24+ * Parses the value of a node into the model
25+ *
26+ * @param ValueInterface $obj
27+ * @param Node $node
28+ * @return void
29+ */
2330 private function parseValue (ValueInterface $ obj , Node $ node ) {
2431 $ value = $ node instanceof Const_ ? $ node ->value : $ node ->default ;
2532 if ($ value !== null ) {
@@ -31,6 +38,12 @@ private function parseValue(ValueInterface $obj, Node $node) {
3138 }
3239 }
3340
41+ /**
42+ * Returns whether this node is a primitive value
43+ *
44+ * @param Node $node
45+ * @return boolean
46+ */
3447 private function isPrimitive (Node $ node ) {
3548 return $ node instanceof String_
3649 || $ node instanceof LNumber
@@ -39,6 +52,12 @@ private function isPrimitive(Node $node) {
3952 || $ this ->isNull ($ node );
4053 }
4154
55+ /**
56+ * Returns the primitive value
57+ *
58+ * @param Node $node
59+ * @return mixed
60+ */
4261 private function getPrimitiveValue (Node $ node ) {
4362 if ($ this ->isBool ($ node )) {
4463 return (bool ) $ this ->getExpression ($ node );
@@ -51,6 +70,12 @@ private function getPrimitiveValue(Node $node) {
5170 return $ node ->value ;
5271 }
5372
73+ /**
74+ * Returns whether this node is a boolean value
75+ *
76+ * @param Node $node
77+ * @return boolean
78+ */
5479 private function isBool (Node $ node ) {
5580 if ($ node instanceof ConstFetch) {
5681 $ const = $ node ->name ->parts [0 ];
@@ -62,6 +87,12 @@ private function isBool(Node $node) {
6287 }
6388 }
6489
90+ /**
91+ * Returns whether this node is a null value
92+ *
93+ * @param Node $node
94+ * @return boolean
95+ */
6596 private function isNull (Node $ node ) {
6697 if ($ node instanceof ConstFetch) {
6798 $ const = $ node ->name ->parts [0 ];
0 commit comments