|
2 | 2 | * Copyright © Magento, Inc. All rights reserved.
|
3 | 3 | * See COPYING.txt for license details.
|
4 | 4 | */
|
5 |
| -package com.magento.idea.magento2plugin.magento.packages; |
6 | 5 |
|
7 |
| -import com.intellij.json.psi.*; |
8 |
| -import org.apache.commons.lang3.StringUtils; |
9 |
| -import org.jetbrains.annotations.NotNull; |
10 |
| -import org.jetbrains.annotations.Nullable; |
| 6 | +package com.magento.idea.magento2plugin.magento.packages; |
11 | 7 |
|
| 8 | +import com.intellij.json.psi.JsonArray; |
| 9 | +import com.intellij.json.psi.JsonObject; |
| 10 | +import com.intellij.json.psi.JsonProperty; |
| 11 | +import com.intellij.json.psi.JsonStringLiteral; |
| 12 | +import com.intellij.json.psi.JsonValue; |
12 | 13 | import java.util.ArrayList;
|
13 | 14 | import java.util.HashMap;
|
14 | 15 | import java.util.List;
|
15 | 16 | import java.util.Map;
|
| 17 | +import org.apache.commons.lang3.StringUtils; |
| 18 | +import org.jetbrains.annotations.NotNull; |
| 19 | +import org.jetbrains.annotations.Nullable; |
16 | 20 |
|
17 | 21 | public class ComposerPackageModelImpl implements ComposerPackageModel {
|
18 | 22 | private final JsonObject sourceComposerJson;
|
@@ -104,15 +108,16 @@ public Map<String, String> getAutoloadPsr4() {
|
104 | 108 | }
|
105 | 109 |
|
106 | 110 | @Nullable
|
| 111 | + @Override |
107 | 112 | public <T extends JsonValue> T getPropertyValueOfType(String propertyName,
|
108 |
| - @NotNull Class<T> aClass) { |
| 113 | + @NotNull Class<T> thisClass) { |
109 | 114 | JsonProperty property = sourceComposerJson.findProperty(propertyName);
|
110 | 115 | if (property == null) {
|
111 | 116 | return null;
|
112 | 117 | }
|
113 | 118 | JsonValue value = property.getValue();
|
114 |
| - if (aClass.isInstance(value)) { |
115 |
| - return aClass.cast(value); |
| 119 | + if (thisClass.isInstance(value)) { |
| 120 | + return thisClass.cast(value); |
116 | 121 | }
|
117 | 122 |
|
118 | 123 | return null;
|
|
0 commit comments