mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-08 04:20:07 +02:00
27 lines
579 B
Swift
27 lines
579 B
Swift
//
|
|
// 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"
|
|
case performSwitch = "switch"
|
|
case fix = "fix"
|
|
case help = "help"
|
|
|
|
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 }
|
|
}
|
|
}
|