Skip to content

Commit 64bef7a

Browse files
author
Caitlin Bales (MSFT)
committed
Fully-qualify type check as per issue in PHP library
microsoftgraph/msgraph-sdk-php#10
1 parent 19047e9 commit 64bef7a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Templates/PHP/Model/ComplexType.php.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ foreach(var property in complex.Properties.Where(prop => prop.Type.GetTypeString
9898
public function get<#=property.Name.ToCheckedCase()#>()
9999
{
100100
if (array_key_exists("<#=property.Name.ToCamelize()#>", $this->_propDict)) {
101-
if (is_a($this->_propDict["<#=property.Name.ToCamelize()#>"], "<#=property.Type.GetTypeString()#>")) {
101+
if (is_a($this->_propDict["<#=property.Name.ToCamelize()#>"], "Microsoft\Graph\Model\<#=property.Type.GetTypeString()#>")) {
102102
return $this->_propDict["<#=property.Name.ToCamelize()#>"];
103103
} else {
104104
<# if (property.Type.GetTypeString() == "\\GuzzleHttp\\Psr7\\Stream") { #>

Templates/PHP/Model/EntityType.php.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ foreach(var property in entity.Properties.Where(prop => prop.Type.GetTypeString(
115115
public function get<#=property.Name.ToCheckedCase()#>()
116116
{
117117
if (array_key_exists("<#=property.Name.ToCamelize()#>", $this->_propDict)) {
118-
if (is_a($this->_propDict["<#=property.Name.ToCamelize()#>"], "<#=property.Type.GetTypeString()#>")) {
118+
if (is_a($this->_propDict["<#=property.Name.ToCamelize()#>"], "Microsoft\Graph\Model\<#=property.Type.GetTypeString()#>")) {
119119
return $this->_propDict["<#=property.Name.ToCamelize()#>"];
120120
} else {
121121
<# if (property.Type.GetTypeString() == "\\GuzzleHttp\\Psr7\\Stream") { #>

0 commit comments

Comments
 (0)