Retours sur la structure du code
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
This commit is contained in:
@ -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 {
|
||||
"""
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user