Retours sur la structure du code
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit

This commit is contained in:
2023-12-08 17:37:21 +01:00
parent 6f8e3b6664
commit ee5055efa5
13 changed files with 177 additions and 143 deletions

View File

@ -8,20 +8,21 @@
import Foundation
enum MatomoGenerator {
case service
var content: String {
static var service: String {
[
MatomoGenerator.service.header,
MatomoGenerator.service.setup,
MatomoGenerator.service.logScreen,
MatomoGenerator.service.logEvent,
MatomoGenerator.service.footer
MatomoGenerator.header,
MatomoGenerator.setup,
MatomoGenerator.logScreen,
MatomoGenerator.logEvent,
MatomoGenerator.footer
]
.joined(separator: "\n")
}
private var header: String {
// MARK: - Private vars
private static var header: String {
"""
// MARK: - Matomo
@ -34,7 +35,7 @@ enum MatomoGenerator {
"""
}
private var setup: String {
private static var setup: String {
"""
// MARK: - Init
@ -63,7 +64,7 @@ enum MatomoGenerator {
"""
}
private var logScreen: String {
private static var logScreen: String {
"""
func logScreen(name: String, path: String) {
guard !tracker.isOptedOut else { return }
@ -79,7 +80,7 @@ enum MatomoGenerator {
"""
}
private var logEvent: String {
private static var logEvent: String {
"""
func logEvent(
name: String,
@ -100,7 +101,7 @@ enum MatomoGenerator {
"""
}
private var footer: String {
private static var footer: String {
"""
}