Skip to content

Commit 0351fad

Browse files
author
Caitlin Bales (MSFT)
committed
Enum and Id updates for PHP
1 parent c9ddb5f commit 0351fad

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

Templates/PHP/Model/EntityType.php.tt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,6 @@ class <#=entity.Name.ToCheckedCase()#>
3535
{
3636
return $this->_propDict;
3737
}
38-
39-
/**
40-
* Gets the item ID
41-
*
42-
* @return int The item ID
43-
*/
44-
public function getId()
45-
{
46-
return $this->_propDict['id'];
47-
}
4838
<#
4939
foreach(var property in entity.Properties.Where(prop => prop.Type.GetTypeString() != "bytes")){
5040
var propertyName = property.Name.ToUnderscore();

Templates/PHP/Model/EnumType.php.tt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ var enumT = host.CurrentType.AsOdcmEnum();
1010
<#=writer.WriteHeader(writer.GetDocBlock(enumT.Name.ToCheckedCase()))#>
1111
namespace Microsoft\Graph\Model;
1212

13+
use Microsoft\Graph\Core\Enum;
14+
1315
<#=writer.GetClassBlock(enumT.Name.ToCheckedCase().ToString(), "Model")#>
14-
class <#=enumT.Name.ToUpperFirstChar()#> extends SplEnum
16+
class <#=enumT.Name.ToUpperFirstChar()#> extends Enum
1517
{
1618
/**
1719
* The Enum <#=enumT.Name.ToUpperFirstChar()#>

0 commit comments

Comments
 (0)