2929
3030class ServiceCollectionExtensions
3131{
32- public static function addLogging (IServiceCollection $ services , Closure $ configure = null )
32+ public static function addLogging (IServiceCollection $ services , ? Closure $ configure = null )
3333 {
3434 $ services ->addSingleton (ILoggerFactory::class, fn (): ILoggerFactory => LoggerFactory::Create ($ configure ));
3535 }
3636
37- public static function addHttpClient (IServiceCollection $ services , Closure $ configure = null )
37+ public static function addHttpClient (IServiceCollection $ services , ? Closure $ configure = null )
3838 {
3939 $ options = new HttpClientOptions ();
4040 if ($ configure ) {
@@ -44,7 +44,7 @@ public static function addHttpClient(IServiceCollection $services, Closure $conf
4444 $ services ->addSingleton (HttpClient::class, fn (): HttpClient => new HttpClient ($ options ));
4545 }
4646
47- public static function addAntiForgery (IServiceCollection $ services , Closure $ configure = null )
47+ public static function addAntiForgery (IServiceCollection $ services , ? Closure $ configure = null )
4848 {
4949 $ options = new AntiForgeryOptions ();
5050 if ($ configure ) {
@@ -63,7 +63,7 @@ public static function addAuthentication(IServiceCollection $services, Closure $
6363 });
6464 }
6565
66- public static function addAuthorization (IServiceCollection $ services , Closure $ configure = null )
66+ public static function addAuthorization (IServiceCollection $ services , ? Closure $ configure = null )
6767 {
6868 $ options = new AuthorizationOptions ();
6969 if ($ configure ) {
@@ -78,7 +78,7 @@ public static function addDbConnection(IServiceCollection $services, string $dat
7878 $ services ->addSingleton (DbConnection::class, fn (): DbConnection => new DbConnection ($ dataSource , $ username , $ password ));
7979 }
8080
81- public static function addEntityContext (IServiceCollection $ services , string $ contextType , Closure $ configure = null )
81+ public static function addEntityContext (IServiceCollection $ services , string $ contextType , ? Closure $ configure = null )
8282 {
8383 $ options = new EntityOptions ();
8484 if ($ configure ) {
0 commit comments