@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function register(Application $app) |
| 31 | 31 | { |
| 32 | - $app[static::TWIG_LOADER_YVES] = function () { |
|
| 32 | + $app[static::TWIG_LOADER_YVES] = function() { |
|
| 33 | 33 | return $this->getFactory()->createFilesystemLoader(); |
| 34 | 34 | }; |
| 35 | 35 | |
@@ -37,8 +37,8 @@ discard block |
||
| 37 | 37 | $app['twig'] = $app->share( |
| 38 | 38 | $app->extend( |
| 39 | 39 | 'twig', |
| 40 | - function (Environment $twig) use ($app) { |
|
| 41 | - $callback = function () use ($app) { |
|
| 40 | + function(Environment $twig) use ($app) { |
|
| 41 | + $callback = function() use ($app) { |
|
| 42 | 42 | $fragmentHandler = new FragmentHandler($app['request_stack'], $app['fragment.renderers']); |
| 43 | 43 | |
| 44 | 44 | return new HttpKernelRuntime($fragmentHandler); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $twigExtension = $this->getFactory()->createProductAbstractReviewTwigExtension(); |
| 28 | 28 | |
| 29 | 29 | $app['twig'] = $app->share( |
| 30 | - $app->extend('twig', function (Environment $twig) use ($twigExtension) { |
|
| 30 | + $app->extend('twig', function(Environment $twig) use ($twigExtension) { |
|
| 31 | 31 | $twig->addExtension($twigExtension); |
| 32 | 32 | |
| 33 | 33 | return $twig; |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $twigExtension = $this->getFactory()->createNavigationTwigExtension(); |
| 28 | 28 | |
| 29 | 29 | $app['twig'] = $app->share( |
| 30 | - $app->extend('twig', function (Environment $twig) use ($twigExtension) { |
|
| 30 | + $app->extend('twig', function(Environment $twig) use ($twigExtension) { |
|
| 31 | 31 | $twig->addExtension($twigExtension); |
| 32 | 32 | |
| 33 | 33 | return $twig; |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | public function register(Application $app) |
| 29 | 29 | { |
| 30 | 30 | $app['twig'] = $app->share( |
| 31 | - $app->extend('twig', function (Environment $twig) { |
|
| 31 | + $app->extend('twig', function(Environment $twig) { |
|
| 32 | 32 | $twig->addFilter($this->getMoneyFilter()); |
| 33 | 33 | $twig->addFilter($this->getMoneyRawFilter()); |
| 34 | 34 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | { |
| 54 | 54 | $moneyFactory = $this->getFactory(); |
| 55 | 55 | |
| 56 | - $filter = new TwigFilter('money', function ($money, $withSymbol = true, $isoCode = null) use ($moneyFactory) { |
|
| 56 | + $filter = new TwigFilter('money', function($money, $withSymbol = true, $isoCode = null) use ($moneyFactory) { |
|
| 57 | 57 | if (!($money instanceof MoneyTransfer)) { |
| 58 | 58 | $money = $this->getMoneyTransfer($money, $isoCode); |
| 59 | 59 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | { |
| 76 | 76 | $moneyFactory = $this->getFactory(); |
| 77 | 77 | |
| 78 | - $filter = new TwigFilter('moneyRaw', function ($money, $isoCode = null) use ($moneyFactory) { |
|
| 78 | + $filter = new TwigFilter('moneyRaw', function($money, $isoCode = null) use ($moneyFactory) { |
|
| 79 | 79 | if (!($money instanceof MoneyTransfer)) { |
| 80 | 80 | $money = $this->getMoneyTransfer($money, $isoCode); |
| 81 | 81 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | public function register(Application $app) |
| 34 | 34 | { |
| 35 | 35 | $app['twig'] = $app->share( |
| 36 | - $app->extend('twig', function (Environment $twig) { |
|
| 36 | + $app->extend('twig', function(Environment $twig) { |
|
| 37 | 37 | $twig->addFilter($this->getFilter()); |
| 38 | 38 | $twig->addFunction($this->getMoneyFormTableFunction($twig)); |
| 39 | 39 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | $moneyFacade = $this->getFacade(); |
| 60 | 60 | |
| 61 | - $filter = new TwigFilter('money', function ($money, $withSymbol = true, $isoCode = null) use ($moneyFacade) { |
|
| 61 | + $filter = new TwigFilter('money', function($money, $withSymbol = true, $isoCode = null) use ($moneyFacade) { |
|
| 62 | 62 | if (!($money instanceof MoneyTransfer)) { |
| 63 | 63 | if (is_int($money)) { |
| 64 | 64 | $money = $moneyFacade->fromInteger($money, $isoCode); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | return new TwigFunction( |
| 96 | 96 | static::FUNCTION_NAME_MONEY_COLLECTION, |
| 97 | - function ($moneyValueFormViewCollection) use ($twig) { |
|
| 97 | + function($moneyValueFormViewCollection) use ($twig) { |
|
| 98 | 98 | return $twig->render( |
| 99 | 99 | static::TEMPLATE_PATH_MONEY_TABLE, |
| 100 | 100 | [ |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | { |
| 36 | 36 | $moneyServiceProvider = new TwigMoneyServiceProvider(); |
| 37 | 37 | $application = new Application(); |
| 38 | - $application['twig'] = function () { |
|
| 38 | + $application['twig'] = function() { |
|
| 39 | 39 | return new Environment(new FilesystemLoader()); |
| 40 | 40 | }; |
| 41 | 41 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | { |
| 67 | 67 | $moneyServiceProvider = new TwigMoneyServiceProvider(); |
| 68 | 68 | $application = new Application(); |
| 69 | - $application['twig'] = function () { |
|
| 69 | + $application['twig'] = function() { |
|
| 70 | 70 | return new Environment(new FilesystemLoader()); |
| 71 | 71 | }; |
| 72 | 72 | $moneyServiceProvider->register($application); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $this->provideFormTypeExtension($app); |
| 30 | 30 | |
| 31 | 31 | $app['twig'] = $app->share( |
| 32 | - $app->extend('twig', function (Environment $twig) { |
|
| 32 | + $app->extend('twig', function(Environment $twig) { |
|
| 33 | 33 | |
| 34 | 34 | $this->registerTwigFunctions($twig); |
| 35 | 35 | $this->registerTwigFilters($twig); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | protected function provideFormTypeExtension(Application $app) |
| 99 | 99 | { |
| 100 | - $app['form.type.extensions'] = $app->share(function () { |
|
| 100 | + $app['form.type.extensions'] = $app->share(function() { |
|
| 101 | 101 | return [ |
| 102 | 102 | new NoValidateTypeExtension(), |
| 103 | 103 | ]; |
@@ -26,19 +26,19 @@ |
||
| 26 | 26 | public function register(Application $app) |
| 27 | 27 | { |
| 28 | 28 | $containerGlobals = new ContainerGlobals(); |
| 29 | - $containerGlobals[ApplicationConstants::FORM_FACTORY] = $containerGlobals->share(function () use ($app) { |
|
| 29 | + $containerGlobals[ApplicationConstants::FORM_FACTORY] = $containerGlobals->share(function() use ($app) { |
|
| 30 | 30 | return $app['form.factory']; |
| 31 | 31 | }); |
| 32 | 32 | |
| 33 | 33 | $app['twig'] = $app->share( |
| 34 | - $app->extend('twig', function (Environment $twig) use ($app) { |
|
| 34 | + $app->extend('twig', function(Environment $twig) use ($app) { |
|
| 35 | 35 | $data = [ |
| 36 | - FormRenderer::class => function () use ($app) { |
|
| 36 | + FormRenderer::class => function() use ($app) { |
|
| 37 | 37 | return $app['twig.form.renderer']; |
| 38 | 38 | }, |
| 39 | 39 | ]; |
| 40 | 40 | if (class_exists(TwigRenderer::class)) { |
| 41 | - $data[TwigRenderer::class] = function () use ($app) { |
|
| 41 | + $data[TwigRenderer::class] = function() use ($app) { |
|
| 42 | 42 | return $app['twig.form.renderer']; |
| 43 | 43 | }; |
| 44 | 44 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | $utilDateTimeService = new UtilDateTimeService(); |
| 26 | 26 | |
| 27 | 27 | $app['twig'] = $app->share( |
| 28 | - $app->extend('twig', function (Environment $twig) use ($utilDateTimeService) { |
|
| 28 | + $app->extend('twig', function(Environment $twig) use ($utilDateTimeService) { |
|
| 29 | 29 | $twig->addExtension(new DateTimeFormatterTwigExtension($utilDateTimeService)); |
| 30 | 30 | |
| 31 | 31 | return $twig; |