Skip to content

Commit bd02ec1

Browse files
author
Vitaliy Boyko
committed
Merge branch '2.0.0-develop' of github.com:magento/magento2-phpstorm-plugin into 89-UI-component-form-generation
2 parents 4655cb7 + 657169c commit bd02ec1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/com/magento/idea/magento2plugin/inspections/php/PluginInspection.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@ private void checkParametersCompatibility(
175175
int index = 0;
176176
for (final Parameter pluginMethodParameter : pluginMethodParameters) {
177177
index++;
178-
final String declaredType = pluginMethodParameter.getDeclaredType().toString();
178+
String declaredType = pluginMethodParameter.getDeclaredType().toString();
179+
180+
if (declaredType.isEmpty()) {
181+
declaredType = pluginMethodParameter.getDocType().toString();
182+
}
179183

180184
if (index == 1) { //NOPMD
181185
final String targetClassFqn = Package.fqnSeparator.concat(targetClassName);
@@ -283,9 +287,8 @@ private void checkParametersCompatibility(
283287
final String targetMethodParameterDeclaredType =
284288
targetMethodParameter.getDeclaredType().toString();
285289

286-
if (!checkTypeIncompatibility(
287-
targetMethodParameterDeclaredType,
288-
declaredType)
290+
if (!checkTypeIncompatibility(targetMethodParameterDeclaredType, declaredType)
291+
&& !pluginMethodParameter.getText().contains("...$")
289292
) {
290293
problemsHolder.registerProblem(
291294
pluginMethodParameter,

0 commit comments

Comments
 (0)