From a67d3ac56bb0ac92a0b0f75694f5aac81053361d Mon Sep 17 00:00:00 2001 From: lmajano Date: Tue, 17 Oct 2023 19:11:27 +0000 Subject: [PATCH] Apply cfformat changes --- system/ioc/Injector.cfc | 13 ++++++------- system/ioc/config/Binder.cfc | 2 +- tests/specs/integration/WireBoxTest.cfc | 10 ++++------ 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/system/ioc/Injector.cfc b/system/ioc/Injector.cfc index 6d643234f..5007b99c9 100644 --- a/system/ioc/Injector.cfc +++ b/system/ioc/Injector.cfc @@ -1503,18 +1503,17 @@ component serializable="false" accessors="true" { private Injector function registerListeners(){ var aopMixerAdded = false; for ( var thisListener in variables.binder.getListeners() ) { - if( thisListener.class == "coldbox.system.aop.Mixer" ){ + if ( thisListener.class == "coldbox.system.aop.Mixer" ) { aopMixerAdded = true; } registerListener( thisListener ); } // If we have any aspects defined but no mixer, auto-add it - if( !aopMixerAdded && variables.binder.hasAspects() ){ - variables.log.info( "AOP aspects detected but no Mixer listener found, auto-adding it with defaults..." ); - registerListener( { - class: "coldbox.system.aop.Mixer", - name: "aopMixer" - } ); + if ( !aopMixerAdded && variables.binder.hasAspects() ) { + variables.log.info( + "AOP aspects detected but no Mixer listener found, auto-adding it with defaults..." + ); + registerListener( { class : "coldbox.system.aop.Mixer", name : "aopMixer" } ); } return this; } diff --git a/system/ioc/config/Binder.cfc b/system/ioc/config/Binder.cfc index 1eb6e4a3f..f43ee68a7 100644 --- a/system/ioc/config/Binder.cfc +++ b/system/ioc/config/Binder.cfc @@ -1455,7 +1455,7 @@ component accessors="true" { * @return True if we have aspects, false if not */ boolean function hasAspects(){ - return mappings.some( (key, mapping) => { + return mappings.some( ( key, mapping ) => { return arguments.mapping.isAspect(); } ); } diff --git a/tests/specs/integration/WireBoxTest.cfc b/tests/specs/integration/WireBoxTest.cfc index 7a408b473..9d95c53b9 100644 --- a/tests/specs/integration/WireBoxTest.cfc +++ b/tests/specs/integration/WireBoxTest.cfc @@ -6,17 +6,15 @@ component extends="tests.resources.BaseIntegrationTest" { /*********************************** BDD SUITES ***********************************/ function run(){ - - story( "Make AOP mixer auto-load if any aspects are defined", function(){ given( "1 or more aspects defined", function(){ then( "the AOP mixer must load", function(){ var mixer = controller.getInterceptorService().getInterceptionStates(); expect( mixer ).toHaveKey( "afterInstanceAutowire" ); - expect( mixer.afterInstanceAutowire.getPool().containsKey( "aopmixer") ).toBeTrue(); - }); - }); - }); + expect( mixer.afterInstanceAutowire.getPool().containsKey( "aopmixer" ) ).toBeTrue(); + } ); + } ); + } ); describe( "WireBox custom DSL", function(){ beforeEach( function( currentSpec ){