File tree Expand file tree Collapse file tree
lib/net/authorize/api/contract/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,9 +49,8 @@ public function getClass(string $class, string $property){
4949
5050 if (isset ($ this ->classes [$ class ]['properties ' ][$ property ]['type ' ])){
5151 $ className = $ this ->classes [$ class ]['properties ' ][$ property ]['type ' ];
52- if (stripos ($ className , 'Date ' ) !== false ) {
53- $ obj ->className = 'DateTime ' ;
54- $ obj ->isCustomDefined = false ;
52+ if (stripos ($ className , 'DateTime ' ) !== false ) {
53+ $ className = 'DateTime ' ;
5554 }
5655 if (substr ( $ className , 0 , 5 ) === "array " ) {
5756 $ className = ltrim ($ className , 'array< ' );
@@ -65,9 +64,9 @@ public function getClass(string $class, string $property){
6564 $ obj ->isInlineArray = $ this ->classes [$ class ]['properties ' ][$ property ]['xml_list ' ]['inline ' ];
6665 $ obj ->arrayEntryname = $ this ->classes [$ class ]['properties ' ][$ property ]['xml_list ' ]['entry_name ' ];
6766 }
68- $ obj ->className = $ className ;
69- $ obj ->isCustomDefined = stripos ($ className , '\\' ) !== false ;
7067 }
68+ $ obj ->className = $ className ;
69+ $ obj ->isCustomDefined = stripos ($ className , '\\' ) !== false ;
7170
7271 return $ obj ;
7372 }
Original file line number Diff line number Diff line change 1919 $this->{'addTo' . $key}($type);
2020 }
2121 }
22- else ($classDetails->className === 'DateTime') {
22+ else if ($classDetails->className === 'DateTime') {
2323 foreach($value AS $keyChild => $valueChild) {
24- $this->{'addTo' . $key}($valueChild);
24+ $type = new \DateTime($valueChild);
25+ $this->{'addTo' . $key}($type);
2526 }
2627 }
2728 else {
3738 $this->{'set' . $key}($type);
3839 }
3940 else if ($classDetails->className === 'DateTime') {
40- $this->{'set' . $key}($value);
41+ $type = new \DateTime($value);
42+ $this->{'set' . $key}($type);
4143 }
4244 else {
4345 $this->{'set' . $key}($value);
You can’t perform that action at this time.
0 commit comments