Skip to content

Commit 3652370

Browse files
committed
chore: simplify code
1 parent 1a10085 commit 3652370

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/main/kotlin/com/github/xepozz/mago/configuration/MagoConfiguration.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ open class MagoConfiguration : QualityToolConfiguration() {
2020
if (other !is MagoConfiguration) {
2121
return 1
2222
}
23-
if (this.getPresentableName(null) == PhpBundle.message("local")) {
23+
if (this.getPresentableName(null) == PhpBundle.message("label.system.php")) {
2424
return -1
2525
}
26-
if (other.getPresentableName(null) == PhpBundle.message("local")) {
26+
if (other.getPresentableName(null) == PhpBundle.message("label.system.php")) {
2727
return 1
2828
}
2929

@@ -63,9 +63,7 @@ open class MagoConfiguration : QualityToolConfiguration() {
6363
override fun getMaxMessagesPerFile(): Int = myMaxMessagesPerFile
6464

6565
override fun clone(): QualityToolConfiguration {
66-
val settings = MagoConfiguration()
67-
clone(settings)
68-
return settings
66+
return clone(MagoConfiguration())
6967
}
7068

7169
fun clone(settings: MagoConfiguration): MagoConfiguration {

src/main/kotlin/com/github/xepozz/mago/configuration/remote/MagoRemoteConfiguration.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ class MagoRemoteConfiguration : MagoConfiguration(), PhpSdkDependentConfiguratio
4141
it.myInterpreterId = this.myInterpreterId
4242
}
4343

44-
super.clone(settings)
45-
46-
return settings
44+
return super.clone(settings)
4745
}
4846

4947
override fun serialize(path: String?): String? = path

0 commit comments

Comments
 (0)