1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-11-09 05:40:07 +01:00

♻️ Cleanup

This commit is contained in:
2021-11-29 01:47:40 +01:00
parent d37913005b
commit 967743715b
4 changed files with 11 additions and 26 deletions

View File

@@ -11,7 +11,7 @@ import Foundation
class Valet {
var version: String
var config: ValetConfiguration
var config: Valet.Configuration
var detectedSites: [String]
init() {
@@ -23,7 +23,7 @@ class Valet {
.appendingPathComponent(".config/valet/config.json")
self.config = try! JSONDecoder().decode(
ValetConfiguration.self,
Valet.Configuration.self,
from: try! String(contentsOf: file, encoding: .utf8).data(using: .utf8)!
)
@@ -33,4 +33,12 @@ class Valet {
self.detectedSites = []
}
// MARK: - Structs
struct Configuration: Decodable {
let tld: String
let paths: [String]
let loopback: String
}
}

View File

@@ -1,17 +0,0 @@
//
// ValetConfiguration.swift
// PHP Monitor
//
// Created by Nico Verbruggen on 29/11/2021.
// Copyright © 2021 Nico Verbruggen. All rights reserved.
//
import Foundation
class ValetConfiguration: Decodable {
let tld: String
let paths: [String]
let loopback: String
}