@@ -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; |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $twigExtension = $this->getFactory()->createProductGroupTwigExtension(); |
| 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; |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $app['twig'] = $app->share( |
| 33 | 33 | $app->extend( |
| 34 | 34 | 'twig', |
| 35 | - function (Environment $twig) use ($twigExtension) { |
|
| 35 | + function(Environment $twig) use ($twigExtension) { |
|
| 36 | 36 | $twig->addExtension($twigExtension); |
| 37 | 37 | |
| 38 | 38 | return $twig; |
@@ -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); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | public function register(Application $app) |
| 27 | 27 | { |
| 28 | - $app['url_matcher'] = $app->share(function () use ($app) { |
|
| 28 | + $app['url_matcher'] = $app->share(function() use ($app) { |
|
| 29 | 29 | /** @var \Symfony\Cmf\Component\Routing\ChainRouter $chainRouter */ |
| 30 | 30 | $chainRouter = $app['routers']; |
| 31 | 31 | $chainRouter->setContext($app['request_context']); |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | return $chainRouter; |
| 34 | 34 | }); |
| 35 | 35 | |
| 36 | - $app['routers'] = $app->share(function () { |
|
| 36 | + $app['routers'] = $app->share(function() { |
|
| 37 | 37 | return new ChainRouter(); |
| 38 | 38 | }); |
| 39 | 39 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | { |
| 79 | 79 | $moneyFacade = $this->getFacade(); |
| 80 | 80 | |
| 81 | - $filter = new TwigFilter(static::FILTER_NAME_MONEY, function ($money, bool $withSymbol = true, ?string $isoCode = null) use ($moneyFacade) { |
|
| 81 | + $filter = new TwigFilter(static::FILTER_NAME_MONEY, function($money, bool $withSymbol = true, ?string $isoCode = null) use ($moneyFacade) { |
|
| 82 | 82 | if (!$money instanceof MoneyTransfer) { |
| 83 | 83 | $money = $this->getMoneyTransferByValueType($money, $moneyFacade, $isoCode); |
| 84 | 84 | } |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | |
| 131 | 131 | return new TwigFunction( |
| 132 | 132 | static::FUNCTION_NAME_MONEY_COLLECTION, |
| 133 | - function ($moneyValueFormViewCollection) use ($twig) { |
|
| 133 | + function($moneyValueFormViewCollection) use ($twig) { |
|
| 134 | 134 | return $twig->render( |
| 135 | 135 | $this->getConfig()->getMoneyTableTemplatePath(), |
| 136 | 136 | [ |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | { |
| 64 | 64 | $moneyFactory = $this->getFactory(); |
| 65 | 65 | |
| 66 | - $filter = new TwigFilter(static::FILTER_NAME_MONEY, function ($money, bool $withSymbol = true, ?string $isoCode = null) use ($moneyFactory) { |
|
| 66 | + $filter = new TwigFilter(static::FILTER_NAME_MONEY, function($money, bool $withSymbol = true, ?string $isoCode = null) use ($moneyFactory) { |
|
| 67 | 67 | if (!$money instanceof MoneyTransfer) { |
| 68 | 68 | $money = $this->getMoneyTransfer($money, $isoCode); |
| 69 | 69 | } |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | { |
| 87 | 87 | $moneyFactory = $this->getFactory(); |
| 88 | 88 | |
| 89 | - $filter = new TwigFilter(static::FILTER_NAME_MONEY_RAW, function ($money, $isoCode = null) use ($moneyFactory) { |
|
| 89 | + $filter = new TwigFilter(static::FILTER_NAME_MONEY_RAW, function($money, $isoCode = null) use ($moneyFactory) { |
|
| 90 | 90 | if (!$money instanceof MoneyTransfer) { |
| 91 | 91 | $money = $this->getMoneyTransfer($money, $isoCode); |
| 92 | 92 | } |