File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
src/Ubiquity/orm/comparator Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -85,12 +85,14 @@ public function getMethodCode($methodName,$newCode){
85
85
if (\method_exists ($ this ->class ,$ methodName )){
86
86
$ r =new \ReflectionMethod ($ this ->class .':: ' .$ methodName );
87
87
$ oldCode =UIntrospection::getMethodCode ($ r ,$ this ->classCode );
88
- $ annotations =$ r ->getAttributes ();
89
- if (\count ($ annotations )>0 ) {
90
- $ oldCode = $ this ->model ->getAnnotsEngine ()->getAnnotationsStr ($ annotations ).$ oldCode ;
91
- }
92
- if ($ this ->removeBlank ($ oldCode )!==$ this ->removeBlank ($ newCode )){
93
- return $ oldCode ;
88
+ if (\method_exists (\ReflectionMethod::class,'getAttributes ' )){
89
+ $ annotations =$ r ->getAttributes ();
90
+ if (\count ($ annotations )>0 ) {
91
+ $ oldCode = $ this ->model ->getAnnotsEngine ()->getAnnotationsStr ($ annotations ).$ oldCode ;
92
+ }
93
+ if ($ this ->removeBlank ($ oldCode )!==$ this ->removeBlank ($ newCode )){
94
+ return $ oldCode ;
95
+ }
94
96
}
95
97
}
96
98
return $ newCode ;
You can’t perform that action at this time.
0 commit comments