Skip to content

Commit

Permalink
validateUndeclaredReceivedProperties -> validateReceivedProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
dfed committed Jan 7, 2024
1 parent 1b77393 commit d1bb9f5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Sources/SafeDICore/Generators/DependencyTreeGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public final class DependencyTreeGenerator {
try validateReachableTypeDescriptions()

let typeDescriptionToScopeMap = try createTypeDescriptionToScopeMapping()
try validateUndeclaredReceivedProperties(typeDescriptionToScopeMap: typeDescriptionToScopeMap)
try validateReceivedProperties(typeDescriptionToScopeMap: typeDescriptionToScopeMap)
let rootScopeGenerators = try rootInstantiableTypes
.sorted()
.compactMap { try typeDescriptionToScopeMap[$0]?.createScopeGenerator() }
Expand Down Expand Up @@ -234,9 +234,9 @@ public final class DependencyTreeGenerator {
return typeDescriptionToScopeMap
}

private func validateUndeclaredReceivedProperties(typeDescriptionToScopeMap: [TypeDescription: Scope]) throws {
private func validateReceivedProperties(typeDescriptionToScopeMap: [TypeDescription: Scope]) throws {
var unfulfillableProperties = Set<DependencyTreeGeneratorError.UnfulfillableProperty>()
func validateUndeclaredReceivedProperties(
func validateReceivedProperties(
on scope: Scope,
receivableProperties: Set<Property>,
instantiables: OrderedSet<Instantiable>
Expand All @@ -262,7 +262,7 @@ public final class DependencyTreeGenerator {
var instantiables = instantiables
instantiables.insert(scope.instantiable, at: 0)

validateUndeclaredReceivedProperties(
validateReceivedProperties(
on: childScope,
receivableProperties: receivableProperties.union(scope.properties),
instantiables: instantiables
Expand All @@ -271,7 +271,7 @@ public final class DependencyTreeGenerator {
}

for rootScope in rootInstantiableTypes.compactMap({ typeDescriptionToScopeMap[$0] }) {
validateUndeclaredReceivedProperties(
validateReceivedProperties(
on: rootScope,
receivableProperties: Set(rootScope.properties),
instantiables: []
Expand Down

0 comments on commit d1bb9f5

Please sign in to comment.