Formatting

This commit is contained in:
Tobe O 2019-10-12 09:47:02 -04:00
parent 13ad8a6d2e
commit a2d6a633aa
2 changed files with 9 additions and 15 deletions

View file

@ -141,7 +141,7 @@ class Container {
/// Shorthand for registering a factory that injects a singleton when it runs. /// Shorthand for registering a factory that injects a singleton when it runs.
/// ///
/// In many cases, you might prefer this to [registerFactory]. /// In many cases, you might prefer this to [registerFactory].
/// ///
/// Returns [f]. /// Returns [f].
T Function(Container) registerLazySingleton<T>(T Function(Container) f, T Function(Container) registerLazySingleton<T>(T Function(Container) f,
{Type as}) { {Type as}) {
@ -157,7 +157,7 @@ class Container {
/// Registers a factory. Any attempt to resolve the /// Registers a factory. Any attempt to resolve the
/// type within *this* container will return the result of [f]. /// type within *this* container will return the result of [f].
/// ///
/// Returns [f]. /// Returns [f].
T Function(Container) registerFactory<T>(T Function(Container) f, {Type as}) { T Function(Container) registerFactory<T>(T Function(Container) f, {Type as}) {
as ??= T; as ??= T;
@ -172,7 +172,7 @@ class Container {
/// Registers a singleton. Any attempt to resolve the /// Registers a singleton. Any attempt to resolve the
/// type within *this* container will return [object]. /// type within *this* container will return [object].
/// ///
/// Returns [object]. /// Returns [object].
T registerSingleton<T>(T object, {Type as}) { T registerSingleton<T>(T object, {Type as}) {
as ??= T == dynamic ? as : T; as ??= T == dynamic ? as : T;

View file

@ -79,9 +79,7 @@ class _ReflectedTypeMirror extends ReflectedType {
_ReflectedTypeMirror(this.mirror) _ReflectedTypeMirror(this.mirror)
: super( : super(
dart.MirrorSystem.getName(mirror.simpleName), dart.MirrorSystem.getName(mirror.simpleName),
mirror.typeVariables mirror.typeVariables.map((m) => _ReflectedTypeParameter(m)).toList(),
.map((m) => _ReflectedTypeParameter(m))
.toList(),
mirror.reflectedType, mirror.reflectedType,
); );
@ -111,9 +109,7 @@ class _ReflectedClassMirror extends ReflectedClass {
_ReflectedClassMirror(this.mirror) _ReflectedClassMirror(this.mirror)
: super( : super(
dart.MirrorSystem.getName(mirror.simpleName), dart.MirrorSystem.getName(mirror.simpleName),
mirror.typeVariables mirror.typeVariables.map((m) => _ReflectedTypeParameter(m)).toList(),
.map((m) => _ReflectedTypeParameter(m))
.toList(),
[], [],
[], [],
_declarationsOf(mirror), _declarationsOf(mirror),
@ -141,8 +137,8 @@ class _ReflectedClassMirror extends ReflectedClass {
var value = mirror.declarations[key]; var value = mirror.declarations[key];
if (value is dart.MethodMirror && !value.isConstructor) { if (value is dart.MethodMirror && !value.isConstructor) {
out.add(_ReflectedDeclarationMirror( out.add(
dart.MirrorSystem.getName(key), value)); _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.'); 'This object was reflected without a ClosureMirror, and therefore cannot be directly invoked.');
} }
return _ReflectedInstanceMirror(closureMirror.invoke( return _ReflectedInstanceMirror(closureMirror.invoke(invocation.memberName,
invocation.memberName, invocation.positionalArguments, invocation.namedArguments));
invocation.positionalArguments,
invocation.namedArguments));
} }
} }