singleton(Migrator::class, static fn (): Migrator => new Migrator()); $c->singleton(Options::class, static fn (): Options => new Options()); $c->singleton(Recipients::class, static fn (): Recipients => new Recipients()); $c->singleton(TipSelection::class, static fn (Container $c): TipSelection => new TipSelection( $c->get(Options::class), $c->get(Recipients::class), )); $c->singleton(TipFee::class, static fn (Container $c): TipFee => new TipFee( $c->get(Options::class), $c->get(TipSelection::class), )); $c->singleton(TipControl::class, static fn (Container $c): TipControl => new TipControl( $c->get(Options::class), $c->get(TipSelection::class), $c->get(Recipients::class), )); // Admin (only needed in wp-admin context). if (is_admin()) { $c->singleton(Settings::class, static fn (Container $c): Settings => new Settings( $c->get(Options::class), )); } };