Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove parameter and return type stencil comments #878

Merged
merged 1 commit into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 0 additions & 8 deletions Sources/NodesGenerator/Resources/Stencils/Analytics.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ internal final class {{ node_name }}AnalyticsImp {
{% endfor %}

/// The initializer.
{% if analytics_properties.count == 1 %}
/// - Parameter {{ analytics_properties.first.name }}: The `{{ analytics_properties.first.type }}` instance
{% else %}
/// - Parameters:
{% for property in analytics_properties %}
/// - {{ property.name }}: The `{{ property.type }}` instance
{% endfor %}
{% endif %}
init(
{% for property in analytics_properties %}
{{ property.name }}: {{ property.type }}{% if not forloop.last %}{{ ',' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ public final class {{ node_name }}Component: Component
/// The initializer.
///
/// Remove `dynamicDependency` default parameter when its type is not `Void`.
///
/// - Parameters:
/// - parent: The parent scope
/// - dynamicDependency: The dynamic component dependency
internal init(
parent: Scope,
dynamicDependency: {{ node_name }}DynamicComponentDependency = ()
Expand Down Expand Up @@ -146,8 +142,6 @@ internal final class {{ node_name }}BuilderImp: AbstractBuilder
/// the dynamic component dependency.
///
/// The dynamic dependencies can be tuples containing multiple values when necessary.
/// - Parameter listener: An object that can listen for signals from the Node
/// - Returns: The Flow instance
internal func build(
withListener listener: {{ plugin_list_name }}Listener
) -> {{ plugin_list_name }}Flow {
Expand All @@ -159,8 +153,6 @@ internal final class {{ node_name }}BuilderImp: AbstractBuilder
/// the dynamic component dependency.
///
/// The dynamic dependencies can be tuples or structs containing multiple values when necessary.
/// - Parameter listener: An object that can listen for signals from the Node
/// - Returns: The Flow instance
internal func build(
withListener listener: {{ node_name }}Listener
) -> {{ node_name }}Flow {
Expand All @@ -170,10 +162,6 @@ internal final class {{ node_name }}BuilderImp: AbstractBuilder
}

/// The factory method in which the Context and Flow are initialized.
/// - Parameters:
/// - component: The component instance
/// - dynamicBuildDependency: The dynamic build dependency
/// - Returns: The Flow instance
override internal func build(
component: {{ node_name }}Component,
dynamicBuildDependency: {{ node_name }}DynamicBuildDependency
Expand Down
22 changes: 0 additions & 22 deletions Sources/NodesGenerator/Resources/Stencils/Builder.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,6 @@ public final class {{ node_name }}Component: Component
/// The initializer.
///
/// Remove `dynamicDependency` default parameter when its type is not `Void`.
///
{% if node_name == "App" %}
/// - Parameter dynamicDependency: The dynamic component dependency
{% else %}
/// - Parameters:
/// - parent: The parent scope
/// - dynamicDependency: The dynamic component dependency
{% endif %}
internal init(
{% if node_name != "App" %}
parent: Scope,
Expand Down Expand Up @@ -201,8 +193,6 @@ internal final class {{ node_name }}BuilderImp: AbstractBuilder
/// the dynamic component dependency.
///
/// The dynamic dependencies can be tuples containing multiple values when necessary.
/// - Parameter listener: An object that can listen for signals from the Node
/// - Returns: The Flow instance
internal func build(
withListener listener: {{ plugin_list_name }}Listener
) -> {{ plugin_list_name }}Flow {
Expand All @@ -214,14 +204,6 @@ internal final class {{ node_name }}BuilderImp: AbstractBuilder
/// the dynamic component dependency.
///
/// The dynamic dependencies can be tuples or structs containing multiple values when necessary.
{% if owns_view %}
/// - Parameter listener: An object that can listen for signals from the Node
{% elif node_name != "App" %}
/// - Parameters:
/// - listener: An object that can listen for signals from the Node
/// - viewController: The injected view controller
{% endif %}
/// - Returns: The Flow instance
{% if node_name == "App" %}
internal func build() -> {{ node_name }}Flow {
{% else %}
Expand All @@ -242,10 +224,6 @@ internal final class {{ node_name }}BuilderImp: AbstractBuilder
}

/// The factory method in which the Context and Flow are initialized.
/// - Parameters:
/// - component: The component instance
/// - dynamicBuildDependency: The dynamic build dependency
/// - Returns: The Flow instance
override internal func build(
component: {{ node_name }}Component,
dynamicBuildDependency: {{ node_name }}DynamicBuildDependency
Expand Down
6 changes: 0 additions & 6 deletions Sources/NodesGenerator/Resources/Stencils/Context.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ internal final class {{ node_name }}ContextImp: AbstractContext {
{% endif %}

/// The initializer.
/// - Parameters:
/// - workers: The Worker instances
{% if owns_view %}
/// - store: The Store instance
{% endif %}
/// - analytics: The Analytics instance
{% if owns_view %}
internal init<T: {{ store_prefix }}StateStore>(
{% else %}
Expand Down
17 changes: 0 additions & 17 deletions Sources/NodesGenerator/Resources/Stencils/Flow.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,6 @@ internal final class {{ node_name }}FlowImp: AbstractFlow
/// The initializer.
///
/// Inject Plugins or Builders into the Flow in order to create sub-Flows.
/// - Parameters:
/// - context: The Context instance
{% if node_name != "App" %}
/// - viewController: The View Controller instance
{% endif %}
{% for property in flow_properties %}
/// - {{ property.name }}: The {{ property.type }} instance
{% endfor %}
{% if node_name == "App" %}
/// - windowSceneBuilder: The Window Scene Builder instance
{% elif node_name == "WindowScene" %}
/// - windowBuilder: The Window Builder instance
{% elif node_name == "Window" %}
/// - rootBuilder: The Root Builder instance
{% endif %}
{% if node_name == "App" or node_name == "WindowScene" or node_name == "Window" or flow_properties %}
internal init(
{% else %}
Expand Down Expand Up @@ -122,8 +107,6 @@ internal final class {{ node_name }}FlowImp: AbstractFlow
{% if owns_view or node_name == "WindowScene" %}

/// Provides the ``ViewControllable`` instance to the parent `Flow` for display or presentation.
///
/// - Returns: The ``ViewControllable`` instance.
{% if node_name == "WindowScene" %}
internal func getViewController() -> {{ node_name }}ViewControllable {
{% else %}
Expand Down
6 changes: 0 additions & 6 deletions Sources/NodesGenerator/Resources/Stencils/Plugin.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ internal final class {{ plugin_name }}PluginImp: Plugin
> {

/// The method in which the Plugin's enabled criteria is defined.
/// - Parameters:
/// - component: The component instance
/// - state: The state
/// - Returns: The enabled status of the Plugin
override internal func isEnabled(
component: {{ plugin_name }}PluginComponent,
state: {{ plugin_name }}PluginStateType
Expand All @@ -96,8 +92,6 @@ internal final class {{ plugin_name }}PluginImp: Plugin
}

/// The factory method in which the instance is initialized.
/// - Parameter component: The component instance
/// - Returns: The initialized instance
override internal func build(
component: {{ plugin_name }}PluginComponent
) -> {{ plugin_name }}Builder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ internal final class {{ plugin_list_name }}PluginListImp: PluginList
> {

/// The method in which the Plugins are paired with keys and wrapped in type erased `AnyPlugin` instances.
/// - Parameter component: The component instance
/// - Returns: The Plugin collection
override internal func plugins(
component: {{ plugin_list_name }}PluginListComponent
) -> KeyValuePairs<{{ plugin_list_name }}PluginListKeyType, AnyPlugin> {
Expand All @@ -129,10 +127,6 @@ internal final class {{ plugin_list_name }}PluginListImp: PluginList
///
/// There is no need to call `super` when overriding this method unless it is desirable to reference (or modify)
/// the default order.
/// - Parameters:
/// - component: The component instance
/// - state: The state
/// - Returns: The keys defining the Plugin creation order
override internal func creationOrder(
component: {{ plugin_list_name }}PluginListComponent,
state: {{ plugin_list_name }}PluginListStateType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ internal struct {{ node_name }}View {
{% endif %}

/// The initializer.
///
/// - Parameter store: The Store instance.
internal init<T: {{ store_prefix }}ViewStateStore>(
store: T
) where T.ViewState == {{ node_name }}ViewState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ internal final class {{ node_name }}ViewController: {{ view_controller_type }},
{% endif %}

/// The initializer.
///
/// - Parameters:
/// - initialState: The initial view state.
/// - {{ view_state_property_name }}: {{ view_state_property_comment }}
internal init(
initialState: {{ node_name }}ViewState,
{{ view_state_property_name }}: {{ publisher_type }}<{{ node_name }}ViewState{% if publisher_failure_type %}, {{ publisher_failure_type }}{% endif %}>
Expand Down
3 changes: 0 additions & 3 deletions Sources/NodesGenerator/Resources/Stencils/ViewState.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ internal struct {{ node_name }}ViewState: Equatable {}
internal class {{ node_name }}ViewStateFactory: Nodes.Transform {

/// The factory method in which state is transformed into view state.
///
/// - Parameter state: The state.
/// - Returns: The view state.
internal func callAsFunction(
_ state: {{ node_name }}State
) -> {{ node_name }}ViewState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ public final class AppComponent: BootstrapComponent {
/// The initializer.
///
/// Remove `dynamicDependency` default parameter when its type is not `Void`.
///
/// - Parameter dynamicDependency: The dynamic component dependency
internal init(
dynamicDependency: AppDynamicComponentDependency = ()
) {
Expand Down Expand Up @@ -106,18 +104,13 @@ internal final class AppBuilderImp: AbstractBuilder
/// the dynamic component dependency.
///
/// The dynamic dependencies can be tuples or structs containing multiple values when necessary.
/// - Returns: The Flow instance
internal func build() -> AppFlow {
let dynamicBuildDependency: AppDynamicBuildDependency = ()
let dynamicComponentDependency: AppDynamicComponentDependency = ()
return build(dynamicBuildDependency, dynamicComponentDependency)
}

/// The factory method in which the Context and Flow are initialized.
/// - Parameters:
/// - component: The component instance
/// - dynamicBuildDependency: The dynamic build dependency
/// - Returns: The Flow instance
override internal func build(
component: AppComponent,
dynamicBuildDependency: AppDynamicBuildDependency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ internal final class AppContextImp: AbstractContext
private let windowScenePublisher: AnyPublisher<WindowSceneEvent, Never>

/// The initializer.
/// - Parameters:
/// - workers: The Worker instances
/// - analytics: The Analytics instance
internal init(
workers: [Worker],
analytics: AppAnalytics,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ internal final class AppFlowImp: AbstractFlow
/// The initializer.
///
/// Inject Plugins or Builders into the Flow in order to create sub-Flows.
/// - Parameters:
/// - context: The Context instance
/// - windowSceneBuilder: The Window Scene Builder instance
internal init(
context: AppContextInterface,
windowSceneBuilder: WindowSceneBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ public final class RootComponent: Component
/// The initializer.
///
/// Remove `dynamicDependency` default parameter when its type is not `Void`.
///
/// - Parameters:
/// - parent: The parent scope
/// - dynamicDependency: The dynamic component dependency
internal init(
parent: Scope,
dynamicDependency: RootDynamicComponentDependency = ()
Expand Down Expand Up @@ -113,8 +109,6 @@ internal final class RootBuilderImp: AbstractBuilder
/// the dynamic component dependency.
///
/// The dynamic dependencies can be tuples or structs containing multiple values when necessary.
/// - Parameter listener: An object that can listen for signals from the Node
/// - Returns: The Flow instance
internal func build(
withListener listener: RootListener
) -> RootFlow {
Expand All @@ -124,10 +118,6 @@ internal final class RootBuilderImp: AbstractBuilder
}

/// The factory method in which the Context and Flow are initialized.
/// - Parameters:
/// - component: The component instance
/// - dynamicBuildDependency: The dynamic build dependency
/// - Returns: The Flow instance
override internal func build(
component: RootComponent,
dynamicBuildDependency: RootDynamicBuildDependency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ internal final class RootContextImp: AbstractContext
private let analytics: RootAnalytics

/// The initializer.
/// - Parameters:
/// - workers: The Worker instances
/// - store: The Store instance
/// - analytics: The Analytics instance
internal init<T: StateStore>(
workers: [Worker],
store: T,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ internal final class RootFlowImp: AbstractFlow
/// The initializer.
///
/// Inject Plugins or Builders into the Flow in order to create sub-Flows.
/// - Parameters:
/// - context: The Context instance
/// - viewController: The View Controller instance
override internal init(
context: RootContextInterface,
viewController: RootViewControllable
Expand All @@ -41,8 +38,6 @@ internal final class RootFlowImp: AbstractFlow
override internal func didStart() {}

/// Provides the ``ViewControllable`` instance to the parent `Flow` for display or presentation.
///
/// - Returns: The ``ViewControllable`` instance.
internal func getViewController() -> ViewControllable {
viewController
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ internal final class RootViewController: UIViewController, StateObserver {
private let label: UILabel = .init()

/// The initializer.
///
/// - Parameters:
/// - initialState: The initial view state.
/// - statePublisher: The view state publisher.
internal init(
initialState: RootViewState,
statePublisher: AnyPublisher<RootViewState, Never>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ internal struct RootViewState: Equatable {
internal class RootViewStateFactory: Nodes.Transform {

/// The factory method in which state is transformed into view state.
///
/// - Parameter state: The state.
/// - Returns: The view state.
internal func callAsFunction(
_ state: RootState
) -> RootViewState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ public final class WindowSceneComponent: Component
/// The initializer.
///
/// Remove `dynamicDependency` default parameter when its type is not `Void`.
///
/// - Parameters:
/// - parent: The parent scope
/// - dynamicDependency: The dynamic component dependency
internal init(
parent: Scope,
dynamicDependency: WindowSceneDynamicComponentDependency = ()
Expand Down Expand Up @@ -120,10 +116,6 @@ internal final class WindowSceneBuilderImp: AbstractBuilder
/// the dynamic component dependency.
///
/// The dynamic dependencies can be tuples or structs containing multiple values when necessary.
/// - Parameters:
/// - listener: An object that can listen for signals from the Node
/// - viewController: The injected view controller
/// - Returns: The Flow instance
internal func build(
withListener listener: WindowSceneListener,
viewController: WindowSceneViewControllable
Expand All @@ -134,10 +126,6 @@ internal final class WindowSceneBuilderImp: AbstractBuilder
}

/// The factory method in which the Context and Flow are initialized.
/// - Parameters:
/// - component: The component instance
/// - dynamicBuildDependency: The dynamic build dependency
/// - Returns: The Flow instance
override internal func build(
component: WindowSceneComponent,
dynamicBuildDependency: WindowSceneDynamicBuildDependency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ internal final class WindowSceneContextImp: AbstractContext
private let analytics: WindowSceneAnalytics

/// The initializer.
/// - Parameters:
/// - workers: The Worker instances
/// - analytics: The Analytics instance
internal init(
workers: [Worker],
analytics: WindowSceneAnalytics
Expand Down
Loading