@@ -50,25 +50,25 @@ private function generateMethodBody(
5050 string $ valueParam ,
5151 PropertyCollection $ properties
5252 ): string {
53- $ typedProperties = $ properties ->filter (function (Property $ property ) { return $ property ->type () !== null ; });
54- $ arrayProperties = $ typedProperties ->filter (function (Property $ property ) { return (string )$ property ->type () === 'array ' ; });
55- $ classProperties = $ typedProperties ->filter (function (Property $ property ) { return isClass ($ property ->type ()); });
53+ $ typedProperties = $ properties ->filter (function (Property $ property ) { return $ property ->phpType () !== null ; });
54+ $ arrayProperties = $ typedProperties ->filter (function (Property $ property ) { return (string )$ property ->phpType () === 'array ' ; });
55+ $ classProperties = $ typedProperties ->filter (function (Property $ property ) { return isClass ($ property ->phpType ()); });
5656 $ valueObjectProperties = $ classProperties ->filter (function (Property $ property ) use ($ templateClass ) {
5757 return $ this ->isValueObject ($ templateClass , $ property );
5858 });
5959 $ mixedProperties = $ properties ->filter (function (Property $ property ) {
60- return $ property ->type () === null
61- || (string )$ property ->type () === 'object '
62- || (string )$ property ->type () === 'iterable '
63- || (string )$ property ->type () === 'callable ' ;
60+ return $ property ->phpType () === null
61+ || (string )$ property ->phpType () === 'object '
62+ || (string )$ property ->phpType () === 'iterable '
63+ || (string )$ property ->phpType () === 'callable ' ;
6464 });
6565
6666 $ testsForTypedProperties = \array_merge (
6767 ["\${$ valueParam } instanceof self " ],
6868
6969 $ typedProperties
70- ->filter (function (Property $ property ) { return !isClass ($ property ->type ()); })
71- ->filter (function (Property $ property ) { return (string )$ property ->type () !== 'array ' ; })
70+ ->filter (function (Property $ property ) { return !isClass ($ property ->phpType ()); })
71+ ->filter (function (Property $ property ) { return (string )$ property ->phpType () !== 'array ' ; })
7272 ->mapPropertyNames (function (string $ propertyName ) use ($ valueParam ) {
7373 return "\$this-> $ propertyName === \${$ valueParam }-> $ propertyName " ;
7474 }),
@@ -137,7 +137,7 @@ private function generateMethodBody(
137137
138138 private function isValueObject (ReflectionClass $ templateClass , Property $ property ): bool
139139 {
140- $ reflectionClass = getClass ($ templateClass , $ property ->type ());
140+ $ reflectionClass = getClass ($ templateClass , $ property ->phpType ());
141141 return $ reflectionClass ->hasMethod ('equals ' )
142142 && $ this ->matchMethod ($ reflectionClass ->getMethod ('equals ' ));
143143 }
0 commit comments