File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -63,17 +63,27 @@ foreach(var property in entity.Properties.Where(prop => prop.Type.GetTypeString(
6363 /**
6464 * Gets the <#=property.Name#>
6565 *
66- * @return <#=propertyNameCap#>CollectionPage The <#=property.Name#>
66+ * @return array( <#=property.Name.ToCheckedCase().Remove(property.Name.ToCheckedCase().Length - 1)#>) The <#=property.Name#>
6767 */
6868 public function get<#=property.Name.ToCheckedCase()#>()
6969 {
7070 if (array_key_exists("<#=property.Name.ToCamelize()#>", $this->_propDict)) {
71- return <#=propertyNameCap#>CollectionPage($this->_propDict["<#=property.Name.ToCamelize()#>"]);
71+ if (array_key_exists(0, $this->_propDict["<#=property.Name.ToCamelize()#>"]) &&
72+ is_a($this->_propDict["<#=property.Name.ToCamelize()#>"][0], 'Microsoft\\Graph\\Model\\<#=property.Name.ToCheckedCase().Remove(property.Name.ToCheckedCase().Length - 1)#>')) {
73+ return $this->_propDict["<#=property.Name.ToCamelize()#>"];
74+ } else {
75+ $collection = array();
76+ foreach ($this->_propDict["<#=property.Name.ToCamelize()#>"] as $item)
77+ {
78+ $collection[] = new <#=property.Name.ToCheckedCase().Remove(property.Name.ToCheckedCase().Length - 1)#>($item);
79+ }
80+ $this->_propDict["<#=property.Name.ToCamelize()#>"] = $collection;
81+ return $this->_propDict["<#=property.Name.ToCamelize()#>"];
82+ }
7283 } else {
7384 return null;
7485 }
7586 }
76-
7787
7888 /**
7989 * Sets the <#=property.Name#>
You can’t perform that action at this time.
0 commit comments