original_string: private function getNodeChildrenProperties(NodePath $nodePath, string $property) : array
      {
          $nodeData = $this->getNode($nodePath);
          $result = [];
          if (!empty($nodeData)) {
              if ($nodeData['nodeType'] == 'object') {
                  foreach ($nodeData as $itemName => $value) {
                      if (is_array($value)) {
                          $itemName = $this->decodeNodeName($itemName);
                          // it is a child node
                          if (isset($value[$property])) {
                              $result[$itemName] = $value[$property];
                          } else {
                              $result[$itemName] = null;
                          }
                      }
                  }
              } elseif ($nodeData['nodeType'] == 'scalar') {
                  foreach ($nodeData as $itemName => $value) {
                      if ($itemName == $property) {
                          $result[$nodePath->getLast()] = $value;
                      }
                  }
              }
          }
          return $result;
      }
code: private function getNodeChildrenProperties(NodePath $nodePath, string $property) : array
      {
          $nodeData = $this->getNode($nodePath);
          $result = [];
          if (!empty($nodeData)) {
              if ($nodeData['nodeType'] == 'object') {
                  foreach ($nodeData as $itemName => $value) {
                      if (is_array($value)) {
                          $itemName = $this->decodeNodeName($itemName);
                          // it is a child node
                          if (isset($value[$property])) {
                              $result[$itemName] = $value[$property];
                          } else {
                              $result[$itemName] = null;
                          }
                      }
                  }
              } elseif ($nodeData['nodeType'] == 'scalar') {
                  foreach ($nodeData as $itemName => $value) {
                      if ($itemName == $property) {
                          $result[$nodePath->getLast()] = $value;
                      }
                  }
              }
          }
          return $result;
      }
code_tokens: private function getNodeChildrenProperties ( NodePath $ nodePath , string $ property ) : array { $ nodeData = $ this -> getNode ( $ nodePath ) ; $ result = [ ] ; if ( ! empty ( $ nodeData ) ) { if ( $ nodeData [ 'nodeType' ] == 'object' ) { foreach ( $ nodeData as $ itemName => $ value ) { if ( is_array ( $ value ) ) { $ itemName = $ this -> decodeNodeName ( $ itemName ) ; // it is a child node if ( isset ( $ value [ $ property ] ) ) { $ result [ $ itemName ] = $ value [ $ property ] ; } else { $ result [ $ itemName ] = null ; } } } } elseif ( $ nodeData [ 'nodeType' ] == 'scalar' ) { foreach ( $ nodeData as $ itemName => $ value ) { if ( $ itemName == $ property ) { $ result [ $ nodePath -> getLast ( ) ] = $ value ; } } } } return $ result ; }
docstring: Return a particular property of a the children of the node.
  @param NodePath $nodePath Node path
  @param string $property Property name (e.g. 'nodeType').
  @return array
docstring_tokens: Return a particular property of a the children of the node .