mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-11-09 13:10:24 +01:00
👌 Handle multiple modes w/ Xdebug menu item
This commit also fixes the width of the header items.
This commit is contained in:
@@ -11,20 +11,23 @@ import Foundation
|
||||
class Xdebug {
|
||||
|
||||
public static var enabled: Bool {
|
||||
return !self.mode.isEmpty
|
||||
return PhpEnv.shared.getConfigFile(forKey: "xdebug.mode") != nil
|
||||
}
|
||||
|
||||
public static var mode: String {
|
||||
public static var activeModes: [String] {
|
||||
guard let file = PhpEnv.shared.getConfigFile(forKey: "xdebug.mode") else {
|
||||
return ""
|
||||
return []
|
||||
}
|
||||
|
||||
return file.get(for: "xdebug.mode") ?? ""
|
||||
guard let value = file.get(for: "xdebug.mode") else {
|
||||
return []
|
||||
}
|
||||
|
||||
return value.components(separatedBy: ",").filter { self.modes.contains($0) }
|
||||
}
|
||||
|
||||
public static var modes: [String] {
|
||||
return [
|
||||
"off",
|
||||
"develop",
|
||||
"coverage",
|
||||
"debug",
|
||||
|
||||
Reference in New Issue
Block a user