Skip to content

Commit fee3d22

Browse files
Fixed static tests
1 parent feff1bf commit fee3d22

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

src/com/magento/idea/magento2plugin/actions/generation/data/ProductEntityData.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public class ProductEntityData implements EavEntityDataInterface {
3030
private String directory;
3131
private String moduleName;
3232

33+
/**
34+
* Constructor.
35+
*/
3336
public ProductEntityData() {
3437
this.required = false;
3538
this.usedInGrid = false;

src/com/magento/idea/magento2plugin/actions/generation/dialog/NewEavAttributeDialog.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040

4141
@SuppressWarnings({"PMD.TooManyFields", "PMD.ExcessiveImports"})
4242
public class NewEavAttributeDialog extends AbstractDialog {
43-
private final static Boolean IS_MODAL = true;
4443
private final String moduleName;
4544
private JPanel contentPanel;
4645
private JButton buttonOK;
@@ -99,7 +98,7 @@ public NewEavAttributeDialog(final Project project, final PsiDirectory directory
9998

10099
private void setPanelConfiguration() {
101100
setContentPane(contentPanel);
102-
setModal(IS_MODAL);
101+
setModal(true);
103102
getRootPane().setDefaultButton(buttonOK);
104103
}
105104

@@ -195,7 +194,7 @@ public static void open(final Project project, final PsiDirectory directory) {
195194
final NewEavAttributeDialog dialog = new NewEavAttributeDialog(project, directory);
196195
dialog.pack();
197196
dialog.centerDialog(dialog);
198-
dialog.setVisible(IS_MODAL);
197+
dialog.setVisible(true);
199198
}
200199

201200
private void onOk() {

src/com/magento/idea/magento2plugin/actions/generation/generator/EavAttributeSetupPatchGenerator.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class EavAttributeSetupPatchGenerator extends FileGenerator {
4343
* Constructor.
4444
*
4545
* @param eavEntityData EavEntityDataInterface
46-
* @param project Project
46+
* @param project Project
4747
*/
4848
public EavAttributeSetupPatchGenerator(
4949
final @NotNull EavEntityDataInterface eavEntityData,
@@ -84,7 +84,10 @@ private String getDataPatchFqn() {
8484
+ eavEntityData.getDataPatchName();
8585
}
8686

87-
private boolean validateIfFileAlreadyExist(final PhpClass dataPatchClass, final String errorTitle) {
87+
private boolean validateIfFileAlreadyExist(
88+
final PhpClass dataPatchClass,
89+
final String errorTitle
90+
) {
8891
if (dataPatchClass != null) {
8992
final String errorMessage = validatorBundle.message(
9093
"validator.file.alreadyExists",
@@ -136,7 +139,10 @@ private PsiDirectory getDataPatchDirectory() {
136139
return parentDirectory;
137140
}
138141

139-
private boolean validateIfFileCanBeCreated(final String errorTitle, final PhpFile dataPathFile) {
142+
private boolean validateIfFileCanBeCreated(
143+
final String errorTitle,
144+
final PhpFile dataPathFile
145+
) {
140146
if (dataPathFile == null) {
141147
final String errorMessage = validatorBundle.message(
142148
"validator.file.cantBeCreated",

src/com/magento/idea/magento2plugin/actions/generation/generator/util/eav/ProductAttributeMapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717
public class ProductAttributeMapper implements AttributeMapperInterface {
1818
@Override
19-
public List<String> mapAttributesByEntityData(@NotNull final EavEntityDataInterface entityData) {
19+
public List<String> mapAttributesByEntityData(
20+
@NotNull final EavEntityDataInterface entityData
21+
) {
2022
final ProductEntityData productEntityData = (ProductEntityData) entityData;
2123

2224
final List<String> attributesWithValues = new ArrayList<>();

0 commit comments

Comments
 (0)