Skip to content

Commit 69880ba

Browse files
author
Caitlin Bales (MSFT)
committed
Update constructor return type & add parent constructor call
1 parent 0724fa8 commit 69880ba

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Templates/PHP/Model/ComplexType.php.tt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ OdcmClass complex = (OdcmClass)host.CurrentType;
1010
<#=writer.WriteHeader(writer.GetDocBlock(complex.Name.ToCheckedCase()))#>
1111
namespace Microsoft\Graph\Model;
1212
<#=writer.GetClassBlock(complex.Name.ToCheckedCase().ToString(), "Model")#>
13-
class <#=complex.Name.ToUpperFirstChar()#> extends Entity
13+
class <#=complex.Name.ToCheckedCase()#> extends Entity
1414
{
1515
/**
1616
* The array of properties available
@@ -25,10 +25,11 @@ class <#=complex.Name.ToUpperFirstChar()#> extends Entity
2525
* @param array $propDict List of properties to set
2626
* Defaults to an empty array
2727
*
28-
* @return null
28+
* @return <#=complex.Name.ToCheckedCase()#>
2929
*/
3030
public function __construct($propDict=array())
3131
{
32+
parent::__construct();
3233
$this->_propDict = $propDict;
3334
}
3435

Templates/PHP/Model/EntityType.php.tt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ class <#=entity.Name.ToCheckedCase()#> extends Entity
3434
private $_propDict;
3535

3636
/**
37-
* Construct a new <#=entity.Name.ToUpperFirstChar()#>
37+
* Construct a new <#=entity.Name.ToCheckedCase()#>
3838
*
3939
* @param array $propDict A list of properties to set
40+
*
41+
* @return <#=entity.Name.ToCheckedCase()#>
4042
*/
4143
function __construct($propDict = array())
4244
{
45+
parent::__construct();
4346
$this->_propDict = $propDict;
4447
}
4548

0 commit comments

Comments
 (0)