@@ -134,7 +134,7 @@ class EntityGenerator
134134
135135 /**
136136 * Visibility of the field
137- *
137+ *
138138 * @var string
139139 */
140140 protected $ fieldVisibility = 'private ' ;
@@ -570,7 +570,7 @@ protected function generateEntityNamespace(ClassMetadataInfo $metadata)
570570 return 'namespace ' . $ this ->getNamespace ($ metadata ) .'; ' ;
571571 }
572572 }
573-
573+
574574 protected function generateEntityUse ()
575575 {
576576 if ($ this ->generateAnnotations ) {
@@ -696,9 +696,9 @@ protected function parseTokensInEntityFile($src)
696696 $ inClass = true ;
697697 } elseif ($ token [0 ] == T_FUNCTION ) {
698698 if ($ tokens [$ i +2 ][0 ] == T_STRING ) {
699- $ this ->staticReflection [$ lastSeenClass ]['methods ' ][] = $ tokens [$ i +2 ][1 ];
699+ $ this ->staticReflection [$ lastSeenClass ]['methods ' ][] = strtolower ( $ tokens [$ i +2 ][1 ]) ;
700700 } elseif ($ tokens [$ i +2 ] == "& " && $ tokens [$ i +3 ][0 ] == T_STRING ) {
701- $ this ->staticReflection [$ lastSeenClass ]['methods ' ][] = $ tokens [$ i +3 ][1 ];
701+ $ this ->staticReflection [$ lastSeenClass ]['methods ' ][] = strtolower ( $ tokens [$ i +3 ][1 ]) ;
702702 }
703703 } elseif (in_array ($ token [0 ], array (T_VAR , T_PUBLIC , T_PRIVATE , T_PROTECTED )) && $ tokens [$ i +2 ][0 ] != T_FUNCTION ) {
704704 $ this ->staticReflection [$ lastSeenClass ]['properties ' ][] = substr ($ tokens [$ i +2 ][1 ], 1 );
@@ -761,7 +761,7 @@ protected function hasMethod($method, ClassMetadataInfo $metadata)
761761
762762 return (
763763 isset ($ this ->staticReflection [$ metadata ->name ]) &&
764- in_array ($ method , $ this ->staticReflection [$ metadata ->name ]['methods ' ])
764+ in_array (strtolower ( $ method) , $ this ->staticReflection [$ metadata ->name ]['methods ' ])
765765 );
766766 }
767767
@@ -1156,7 +1156,7 @@ protected function generateEntityStubMethod(ClassMetadataInfo $metadata, $type,
11561156 if ($ this ->hasMethod ($ methodName , $ metadata )) {
11571157 return '' ;
11581158 }
1159- $ this ->staticReflection [$ metadata ->name ]['methods ' ][] = $ methodName ;
1159+ $ this ->staticReflection [$ metadata ->name ]['methods ' ][] = strtolower ( $ methodName) ;
11601160
11611161 $ var = sprintf ('%sMethodTemplate ' , $ type );
11621162 $ template = static ::$ $ var ;
@@ -1445,11 +1445,11 @@ protected function generateFieldMappingPropertyDocBlock(array $fieldMapping, Cla
14451445 if (isset ($ fieldMapping ['nullable ' ])) {
14461446 $ column [] = 'nullable= ' . var_export ($ fieldMapping ['nullable ' ], true );
14471447 }
1448-
1448+
14491449 if (isset ($ fieldMapping ['unsigned ' ]) && $ fieldMapping ['unsigned ' ]) {
14501450 $ column [] = 'options={"unsigned"=true} ' ;
14511451 }
1452-
1452+
14531453 if (isset ($ fieldMapping ['columnDefinition ' ])) {
14541454 $ column [] = 'columnDefinition=" ' . $ fieldMapping ['columnDefinition ' ] . '" ' ;
14551455 }
@@ -1571,15 +1571,15 @@ protected function getIdGeneratorTypeString($type)
15711571 private function exportTableOptions (array $ options )
15721572 {
15731573 $ optionsStr = array ();
1574-
1574+
15751575 foreach ($ options as $ name => $ option ) {
15761576 if (is_array ($ option )) {
15771577 $ optionsStr [] = '" ' . $ name . '"={ ' . $ this ->exportTableOptions ($ option ) . '} ' ;
15781578 } else {
15791579 $ optionsStr [] = '" ' . $ name . '"=" ' . (string ) $ option . '" ' ;
1580- }
1580+ }
15811581 }
1582-
1582+
15831583 return implode (', ' , $ optionsStr );
15841584 }
15851585}
0 commit comments