1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-07 20:10:08 +02:00

♻️ Reorganise code for optimal code sharing, add phpmon-cli

- Moved over common functionality to package
- Added phpmon-cli target (for fast switching via the terminal)
This commit is contained in:
2021-12-20 18:25:52 +01:00
parent fa2de1f77c
commit 1ca49f6cbc
23 changed files with 379 additions and 53 deletions

View File

@ -0,0 +1,23 @@
//
// AllowedArguments.swift
// phpmon-cli
//
// Created by Nico Verbruggen on 20/12/2021.
// Copyright © 2021 Nico Verbruggen. All rights reserved.
//
import Foundation
enum AllowedArguments: String, CaseIterable {
case use = "use"
static func has(_ string: String) -> Bool {
return Self.allCases.contains { arg in
return arg.rawValue == string
}
}
static var rawValues: [String] {
return Self.allCases.map { $0.rawValue }
}
}

12
phpmon-cli/main.swift Normal file
View File

@ -0,0 +1,12 @@
//
// main.swift
// phpmon-cli
//
// Created by Nico Verbruggen on 20/12/2021.
// Copyright © 2021 Nico Verbruggen. All rights reserved.
//
import Foundation
print("Hello, World!")

View File

@ -0,0 +1,11 @@
//
// main.swift
// phpmon-cli
//
// Created by Nico Verbruggen on 20/12/2021.
//
import Foundation
print("Hello, World!")