diff --git a/angel_container/lib/src/container.dart b/angel_container/lib/src/container.dart index c28c8187..3ab78bde 100644 --- a/angel_container/lib/src/container.dart +++ b/angel_container/lib/src/container.dart @@ -141,7 +141,7 @@ class Container { /// Shorthand for registering a factory that injects a singleton when it runs. /// /// In many cases, you might prefer this to [registerFactory]. - /// + /// /// Returns [f]. T Function(Container) registerLazySingleton(T Function(Container) f, {Type as}) { @@ -157,7 +157,7 @@ class Container { /// Registers a factory. Any attempt to resolve the /// type within *this* container will return the result of [f]. - /// + /// /// Returns [f]. T Function(Container) registerFactory(T Function(Container) f, {Type as}) { as ??= T; @@ -172,7 +172,7 @@ class Container { /// Registers a singleton. Any attempt to resolve the /// type within *this* container will return [object]. - /// + /// /// Returns [object]. T registerSingleton(T object, {Type as}) { as ??= T == dynamic ? as : T; diff --git a/angel_container/lib/src/mirrors/reflector.dart b/angel_container/lib/src/mirrors/reflector.dart index 53373549..1e7bae37 100644 --- a/angel_container/lib/src/mirrors/reflector.dart +++ b/angel_container/lib/src/mirrors/reflector.dart @@ -79,9 +79,7 @@ class _ReflectedTypeMirror extends ReflectedType { _ReflectedTypeMirror(this.mirror) : super( dart.MirrorSystem.getName(mirror.simpleName), - mirror.typeVariables - .map((m) => _ReflectedTypeParameter(m)) - .toList(), + mirror.typeVariables.map((m) => _ReflectedTypeParameter(m)).toList(), mirror.reflectedType, ); @@ -111,9 +109,7 @@ class _ReflectedClassMirror extends ReflectedClass { _ReflectedClassMirror(this.mirror) : super( dart.MirrorSystem.getName(mirror.simpleName), - mirror.typeVariables - .map((m) => _ReflectedTypeParameter(m)) - .toList(), + mirror.typeVariables.map((m) => _ReflectedTypeParameter(m)).toList(), [], [], _declarationsOf(mirror), @@ -141,8 +137,8 @@ class _ReflectedClassMirror extends ReflectedClass { var value = mirror.declarations[key]; if (value is dart.MethodMirror && !value.isConstructor) { - out.add(_ReflectedDeclarationMirror( - dart.MirrorSystem.getName(key), value)); + out.add( + _ReflectedDeclarationMirror(dart.MirrorSystem.getName(key), value)); } } @@ -245,9 +241,7 @@ class _ReflectedMethodMirror extends ReflectedFunction { 'This object was reflected without a ClosureMirror, and therefore cannot be directly invoked.'); } - return _ReflectedInstanceMirror(closureMirror.invoke( - invocation.memberName, - invocation.positionalArguments, - invocation.namedArguments)); + return _ReflectedInstanceMirror(closureMirror.invoke(invocation.memberName, + invocation.positionalArguments, invocation.namedArguments)); } }