Description
Replace all .init syntax with explicit type names throughout the codebase to improve readability and maintainability.
Problem
The codebase uses .init shorthand in various places. While valid Swift syntax, this requires readers to infer the type from context, adding cognitive load during code review and maintenance.
Solution
Replace .init with explicit type constructors.
Example
self.images = .init(cache: imageCache, configuration: parserConfiguration)
self.colors = .init(cache: colorCache, configuration: parserConfiguration)
self.interactiveColors = .init(cache: interactiveColorsCache, configuration: parserConfiguration)
self.metrics = .init(cache: metricsCache, configuration: parserConfiguration)
self.fonts = .init(cache: fontsCache, configuration: parserConfiguration)
should be
self.images = SnappThemingImageDeclarations(cache: imageCache, configuration: parserConfiguration)
self.colors = SnappThemingColorDeclarations(cache: colorCache, configuration: parserConfiguration)
self.interactiveColors = SnappThemingInteractiveColorDeclarations(cache: interactiveColorsCache, configuration: parserConfiguration)
self.metrics = SnappThemingMetricDeclarations(cache: metricsCache, configuration: parserConfiguration)
self.fonts = SnappThemingFontDeclarations(cache: fontsCache, configuration: parserConfiguration)
Description
Replace all
.initsyntax with explicit type names throughout the codebase to improve readability and maintainability.Problem
The codebase uses
.initshorthand in various places. While valid Swift syntax, this requires readers to infer the type from context, adding cognitive load during code review and maintenance.Solution
Replace
.initwith explicit type constructors.Example
should be