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

♻️ Rework various common classes

This commit is contained in:
2021-12-21 16:00:27 +01:00
parent a6387e96e7
commit ceb168c6cf
21 changed files with 272 additions and 216 deletions

View File

@@ -0,0 +1,30 @@
//
// HomebrewPackage.swift
// PHP Monitor
//
// Copyright © 2021 Nico Verbruggen. All rights reserved.
//
import Foundation
struct HomebrewPackage: Decodable {
let name: String
let full_name: String
let aliases: [String]
let installed: [HomebrewInstalled]
let linked_keg: String?
public var version: String {
return aliases.first!
.replacingOccurrences(of: "php@", with: "")
}
}
struct HomebrewInstalled: Decodable {
let version: String
let built_as_bottle: Bool
let installed_as_dependency: Bool
let installed_on_request: Bool
}