Skip to content

Commit

Permalink
Merge pull request #44 from dmeybohm/fix-phpstorm-2020.3
Browse files Browse the repository at this point in the history
Fix phpstorm 2020.3
  • Loading branch information
dmeybohm authored Dec 18, 2020
2 parents 50db97e + 2ee9c22 commit 8f128fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group 'com.daveme.chocolateCakePHP'
version '0.6.2'
version '0.6.3'

sourceCompatibility = 1.8

Expand Down
14 changes: 9 additions & 5 deletions src/main/kotlin/controller/ControllerMethodLineMarker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ class ControllerMethodLineMarker : LineMarkerProvider {
.createLineMarkerInfo(nameIdentifier)
}

private fun addLineMarkerUnique(collection: MutableCollection<in LineMarkerInfo<*>>, newMarker: LineMarkerInfo<*>?) {
private fun addLineMarkerUnique(
collection: MutableCollection<LineMarkerInfo<*>>,
newMarker: LineMarkerInfo<*>?
) {
if (newMarker == null) {
return
}
Expand All @@ -52,10 +55,10 @@ class ControllerMethodLineMarker : LineMarkerProvider {
}

override fun collectSlowLineMarkers(
list: MutableList<out PsiElement>,
collection: MutableCollection<in LineMarkerInfo<*>>
elements: MutableList<PsiElement>,
result: MutableCollection<LineMarkerInfo<*>>
) {
for (element in list) {
for (element in elements) {
val settings = Settings.getInstance(element.project)
if (!settings.enabled) {
return
Expand All @@ -64,7 +67,8 @@ class ControllerMethodLineMarker : LineMarkerProvider {
val virtualFile = file.virtualFile ?: continue
val controllerName = virtualFile.nameWithoutExtension.controllerBaseName() ?: continue
val info = getRelatedFiles(file, controllerName, element)
addLineMarkerUnique(collection, info)
addLineMarkerUnique(result, info)
}
}

}

0 comments on commit 8f128fd

Please sign in to comment.