| @@ -23,7 +23,7 @@ | ||
| 23 | 23 | */ | 
| 24 | 24 | public function __construct(string $name, Twig_Node_Expression $value, int $line, ?string $tag = null) | 
| 25 | 25 |      { | 
| 26 | - parent::__construct(['value' => $value], ['name' => $name], $line, $tag); | |
| 26 | + parent::__construct([ 'value' => $value ], [ 'name' => $name ], $line, $tag); | |
| 27 | 27 | } | 
| 28 | 28 | |
| 29 | 29 | /** | 
| @@ -26,8 +26,8 @@ | ||
| 26 | 26 |      { | 
| 27 | 27 | $twigExtension = $this->getFactory()->createShopUiCompatibilityTwigExtension(); | 
| 28 | 28 | |
| 29 | - $app['twig'] = $app->share( | |
| 30 | -            $app->extend('twig', function (Twig_Environment $twig) use ($twigExtension) { | |
| 29 | + $app[ 'twig' ] = $app->share( | |
| 30 | +            $app->extend('twig', function(Twig_Environment $twig) use ($twigExtension) { | |
| 31 | 31 | $twig->addExtension($twigExtension); | 
| 32 | 32 | |
| 33 | 33 | return $twig; | 
| @@ -41,7 +41,7 @@ discard block | ||
| 41 | 41 | */ | 
| 42 | 42 | public function getFilters(): array | 
| 43 | 43 |      { | 
| 44 | - return []; | |
| 44 | + return [ ]; | |
| 45 | 45 | } | 
| 46 | 46 | |
| 47 | 47 | /** | 
| @@ -50,7 +50,7 @@ discard block | ||
| 50 | 50 | public function getFunctions(): array | 
| 51 | 51 |      { | 
| 52 | 52 | return [ | 
| 53 | -            new Twig_SimpleFunction(self::FUNCTION_GET_PUBLIC_FOLDER_PATH, function ($relativePath) { | |
| 53 | +            new Twig_SimpleFunction(self::FUNCTION_GET_PUBLIC_FOLDER_PATH, function($relativePath) { | |
| 54 | 54 | $publicFolderPath = $this->getPublicFolderPath(); | 
| 55 | 55 | return $publicFolderPath . $relativePath; | 
| 56 | 56 | }, [ | 
| @@ -58,95 +58,95 @@ discard block | ||
| 58 | 58 | self::FUNCTION_GET_PUBLIC_FOLDER_PATH, | 
| 59 | 59 | ]), | 
| 60 | 60 | |
| 61 | -            new Twig_SimpleFunction(self::FUNCTION_GET_QA_ATTRIBUTE, function (array $qaValues = []) { | |
| 61 | +            new Twig_SimpleFunction(self::FUNCTION_GET_QA_ATTRIBUTE, function(array $qaValues = [ ]) { | |
| 62 | 62 | return $this->getQaAttribute($qaValues); | 
| 63 | 63 | }, [ | 
| 64 | 64 | $this, | 
| 65 | 65 | self::FUNCTION_GET_QA_ATTRIBUTE, | 
| 66 | - 'is_safe' => ['html'], | |
| 66 | + 'is_safe' => [ 'html' ], | |
| 67 | 67 | 'is_variadic' => true, | 
| 68 | 68 | ]), | 
| 69 | 69 | |
| 70 | -            new Twig_SimpleFunction(self::FUNCTION_GET_QA_ATTRIBUTE_SUB, function ($qaName, array $qaValues = []) { | |
| 70 | +            new Twig_SimpleFunction(self::FUNCTION_GET_QA_ATTRIBUTE_SUB, function($qaName, array $qaValues = [ ]) { | |
| 71 | 71 | return $this->getQaAttribute($qaValues, $qaName); | 
| 72 | 72 | }, [ | 
| 73 | 73 | $this, | 
| 74 | 74 | self::FUNCTION_GET_QA_ATTRIBUTE_SUB, | 
| 75 | - 'is_safe' => ['html'], | |
| 75 | + 'is_safe' => [ 'html' ], | |
| 76 | 76 | 'is_variadic' => true, | 
| 77 | 77 | ]), | 
| 78 | 78 | |
| 79 | -            new Twig_SimpleFunction(self::FUNCTION_GET_UI_MODEL_COMPONENT_TEMPLATE, function ($modelName) { | |
| 79 | +            new Twig_SimpleFunction(self::FUNCTION_GET_UI_MODEL_COMPONENT_TEMPLATE, function($modelName) { | |
| 80 | 80 | return $this->getModelTemplate($modelName); | 
| 81 | 81 | }, [ | 
| 82 | 82 | $this, | 
| 83 | 83 | self::FUNCTION_GET_UI_MODEL_COMPONENT_TEMPLATE, | 
| 84 | 84 | ]), | 
| 85 | 85 | |
| 86 | -            new Twig_SimpleFunction(self::FUNCTION_GET_UI_ATOM_COMPONENT_TEMPLATE, function ($componentName, $componentModule = self::DEFAULT_MODULE) { | |
| 86 | +            new Twig_SimpleFunction(self::FUNCTION_GET_UI_ATOM_COMPONENT_TEMPLATE, function($componentName, $componentModule = self::DEFAULT_MODULE) { | |
| 87 | 87 | return $this->getComponentTemplate($componentModule, 'atoms', $componentName); | 
| 88 | 88 | }, [ | 
| 89 | 89 | $this, | 
| 90 | 90 | self::FUNCTION_GET_UI_ATOM_COMPONENT_TEMPLATE, | 
| 91 | 91 | ]), | 
| 92 | 92 | |
| 93 | -            new Twig_SimpleFunction(self::FUNCTION_GET_UI_MOLECULE_COMPONENT_TEMPLATE, function ($componentName, $componentModule = self::DEFAULT_MODULE) { | |
| 93 | +            new Twig_SimpleFunction(self::FUNCTION_GET_UI_MOLECULE_COMPONENT_TEMPLATE, function($componentName, $componentModule = self::DEFAULT_MODULE) { | |
| 94 | 94 | return $this->getComponentTemplate($componentModule, 'molecules', $componentName); | 
| 95 | 95 | }, [ | 
| 96 | 96 | $this, | 
| 97 | 97 | self::FUNCTION_GET_UI_MOLECULE_COMPONENT_TEMPLATE, | 
| 98 | 98 | ]), | 
| 99 | 99 | |
| 100 | -            new Twig_SimpleFunction(self::FUNCTION_GET_UI_ORGANISM_COMPONENT_TEMPLATE, function ($componentName, $componentModule = self::DEFAULT_MODULE) { | |
| 100 | +            new Twig_SimpleFunction(self::FUNCTION_GET_UI_ORGANISM_COMPONENT_TEMPLATE, function($componentName, $componentModule = self::DEFAULT_MODULE) { | |
| 101 | 101 | return $this->getComponentTemplate($componentModule, 'organisms', $componentName); | 
| 102 | 102 | }, [ | 
| 103 | 103 | $this, | 
| 104 | 104 | self::FUNCTION_GET_UI_ORGANISM_COMPONENT_TEMPLATE, | 
| 105 | 105 | ]), | 
| 106 | 106 | |
| 107 | -            new Twig_SimpleFunction(self::FUNCTION_GET_UI_TEMPLATE_COMPONENT_TEMPLATE, function ($templateName, $templateModule = self::DEFAULT_MODULE) { | |
| 107 | +            new Twig_SimpleFunction(self::FUNCTION_GET_UI_TEMPLATE_COMPONENT_TEMPLATE, function($templateName, $templateModule = self::DEFAULT_MODULE) { | |
| 108 | 108 | return $this->getTemplateTemplate($templateModule, $templateName); | 
| 109 | 109 | }, [ | 
| 110 | 110 | $this, | 
| 111 | 111 | self::FUNCTION_GET_UI_TEMPLATE_COMPONENT_TEMPLATE, | 
| 112 | 112 | ]), | 
| 113 | 113 | |
| 114 | -            new Twig_SimpleFunction(self::FUNCTION_GET_UI_VIEW_COMPONENT_TEMPLATE, function ($viewName, $viewModule = self::DEFAULT_MODULE) { | |
| 114 | +            new Twig_SimpleFunction(self::FUNCTION_GET_UI_VIEW_COMPONENT_TEMPLATE, function($viewName, $viewModule = self::DEFAULT_MODULE) { | |
| 115 | 115 | return $this->getViewTemplate($viewModule, $viewName); | 
| 116 | 116 | }, [ | 
| 117 | 117 | $this, | 
| 118 | 118 | self::FUNCTION_GET_UI_VIEW_COMPONENT_TEMPLATE, | 
| 119 | 119 | ]), | 
| 120 | 120 | |
| 121 | -            new Twig_SimpleFunction('widget', function () { | |
| 121 | +            new Twig_SimpleFunction('widget', function() { | |
| 122 | 122 | return null; | 
| 123 | 123 | }, [ | 
| 124 | 124 | $this, | 
| 125 | 125 | 'widget', | 
| 126 | 126 | ]), | 
| 127 | 127 | |
| 128 | -            new Twig_SimpleFunction('widgetBlock', function () { | |
| 128 | +            new Twig_SimpleFunction('widgetBlock', function() { | |
| 129 | 129 | return null; | 
| 130 | 130 | }, [ | 
| 131 | 131 | $this, | 
| 132 | 132 | 'widgetBlock', | 
| 133 | 133 | ]), | 
| 134 | 134 | |
| 135 | -            new Twig_SimpleFunction('widgetGlobal', function () { | |
| 135 | +            new Twig_SimpleFunction('widgetGlobal', function() { | |
| 136 | 136 | return null; | 
| 137 | 137 | }, [ | 
| 138 | 138 | $this, | 
| 139 | 139 | 'widgetGlobal', | 
| 140 | 140 | ]), | 
| 141 | 141 | |
| 142 | -            new Twig_SimpleFunction('widgetExists', function () { | |
| 142 | +            new Twig_SimpleFunction('widgetExists', function() { | |
| 143 | 143 | return false; | 
| 144 | 144 | }, [ | 
| 145 | 145 | $this, | 
| 146 | 146 | 'widgetExists', | 
| 147 | 147 | ]), | 
| 148 | 148 | |
| 149 | -            new Twig_SimpleFunction('widgetGlobalExists', function () { | |
| 149 | +            new Twig_SimpleFunction('widgetGlobalExists', function() { | |
| 150 | 150 | return false; | 
| 151 | 151 | }, [ | 
| 152 | 152 | $this, | 
| @@ -179,7 +179,7 @@ discard block | ||
| 179 | 179 | * | 
| 180 | 180 | * @return string | 
| 181 | 181 | */ | 
| 182 | - protected function getQaAttribute(array $qaValues = [], ?string $qaName = null): string | |
| 182 | + protected function getQaAttribute(array $qaValues = [ ], ?string $qaName = null): string | |
| 183 | 183 |      { | 
| 184 | 184 | $value = ''; | 
| 185 | 185 | |