File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed
src/com/magento/idea/magento2plugin
actions/generation/generator Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ private PhpFile createDataPathClass(final String actionName) {
111
111
final PsiDirectory parentDirectory = getDataPatchDirectory ();
112
112
final Properties attributes = getAttributes ();
113
113
final PsiFile dataPatchFile = fileFromTemplateGenerator .generate (
114
- EavAttributeDataPatchPhp . getInstance (eavEntityData .getDataPatchName ()),
114
+ new EavAttributeDataPatchPhp (eavEntityData .getDataPatchName ()),
115
115
attributes ,
116
116
parentDirectory ,
117
117
actionName
Original file line number Diff line number Diff line change 11
11
public class EavAttributeDataPatchPhp implements ModuleFileInterface {
12
12
public static final String TEMPLATE = "Magento Eav Attribute Data Patch Class" ;
13
13
public static final String DEFAULT_DIR = "Setup/Patch/Data" ;
14
- private static EavAttributeDataPatchPhp instance ;
15
14
private String fileName ;
16
15
17
- public void setFileName (final String fileName ) {
18
- this .fileName = fileName ;
19
- }
20
-
21
16
/**
22
- * Create instance by class name .
17
+ * Constructor .
23
18
*
24
19
* @param className String
25
- * @return EavAttributeDataPatchPhp
26
20
*/
27
- public static EavAttributeDataPatchPhp getInstance (final String className ) {
28
- if (null == instance ) {
29
- instance = new EavAttributeDataPatchPhp ();
30
- }
31
-
32
- instance .setFileName (className .concat (".php" ));
21
+ public EavAttributeDataPatchPhp (final String className ) {
22
+ fileName = className .concat (".php" );
23
+ }
33
24
34
- return instance ;
25
+ public void setFileName (final String fileName ) {
26
+ this .fileName = fileName ;
35
27
}
36
28
37
29
@ Override
You can’t perform that action at this time.
0 commit comments