@@ -172,8 +172,8 @@ discard block |
||
| 172 | 172 | 'varDump', |
| 173 | 173 | function ($args) { |
| 174 | 174 | /** |
| 175 | - * @noinspection ForgottenDebugOutputInspection |
|
| 176 | - */ |
|
| 175 | + * @noinspection ForgottenDebugOutputInspection |
|
| 176 | + */ |
|
| 177 | 177 | var_dump($args); |
| 178 | 178 | }, |
| 179 | 179 | array('is_safe' => array('html')) |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | protected function extendForPagination() : void |
| 185 | 185 | { |
| 186 | 186 | /** |
| 187 | - * @noinspection MoreThanThreeArgumentsInspection |
|
| 187 | + * @noinspection MoreThanThreeArgumentsInspection |
|
| 188 | 188 | */ |
| 189 | 189 | $filter = new \Twig_SimpleFunction( |
| 190 | 190 | 'Pagination', |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | $tmpArray = []; |
| 52 | 52 | foreach ($translateArray as $key => $value) { |
| 53 | - $tmpArray['@'.$key] = $value; |
|
| 53 | + $tmpArray['@' . $key] = $value; |
|
| 54 | 54 | } |
| 55 | 55 | return $tmpArray; |
| 56 | 56 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | { |
| 60 | 60 | $filter = new \Twig_SimpleFunction( |
| 61 | 61 | 'getUrl', |
| 62 | - function ( |
|
| 62 | + function( |
|
| 63 | 63 | $alias, |
| 64 | 64 | $params = [] |
| 65 | 65 | ) { |
@@ -68,9 +68,9 @@ discard block |
||
| 68 | 68 | $relative_path = $data; |
| 69 | 69 | foreach ($params as $param => $value) { |
| 70 | 70 | if (strpos($param, ':') === strlen($param)-1) { |
| 71 | - $relative_path = preg_replace('/{'.$param.'(.*?)}/msi', $value, $relative_path); |
|
| 71 | + $relative_path = preg_replace('/{' . $param . '(.*?)}/msi', $value, $relative_path); |
|
| 72 | 72 | } else { |
| 73 | - $relative_path = str_replace('{'.$param.'}', $value, $relative_path); |
|
| 73 | + $relative_path = str_replace('{' . $param . '}', $value, $relative_path); |
|
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | return $this->config['base_url'] . '/' . $relative_path; |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | { |
| 87 | 87 | $filter = new \Twig_SimpleFunction( |
| 88 | 88 | 'Widget_*_*', |
| 89 | - function ($widgetNameStr, $widgetActionStr, $args = []) { |
|
| 89 | + function($widgetNameStr, $widgetActionStr, $args = []) { |
|
| 90 | 90 | $widgetAction = $this->toCamelCase->transform($widgetActionStr); |
| 91 | 91 | $widgetName = $this->toCamelCase->transform($widgetNameStr); |
| 92 | 92 | $widget = '\\' . $this->config['app_namespace'] . '\\Widget\\' . $widgetName; |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | ); |
| 113 | 113 | throw new InvalidArgumentException($message); |
| 114 | 114 | } |
| 115 | - $templateFile = '_widgets/' |
|
| 115 | + $templateFile = '_widgets/' |
|
| 116 | 116 | . $this->toSnakeCase->transform($widgetNameStr) . '/' . $templateFileBasename; |
| 117 | 117 | $widgetData = $widgetInstance->{$widgetAction}(); |
| 118 | 118 | return $this->twig->render($templateFile, $widgetData); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | { |
| 127 | 127 | $filter = new \Twig_SimpleFunction( |
| 128 | 128 | 'queryParams', |
| 129 | - function ($queryParams, $prefix = '?') { |
|
| 129 | + function($queryParams, $prefix = '?') { |
|
| 130 | 130 | return $prefix . http_build_query($queryParams); |
| 131 | 131 | }, |
| 132 | 132 | array('is_safe' => array('html')) |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | { |
| 139 | 139 | $filter = new \Twig_SimpleFunction( |
| 140 | 140 | 'siteUrl', |
| 141 | - function ($path = '') { |
|
| 141 | + function($path = '') { |
|
| 142 | 142 | return $this->config['base_url'] . $path; |
| 143 | 143 | }, |
| 144 | 144 | array('is_safe' => array('html')) |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | { |
| 151 | 151 | $filter = new \Twig_SimpleFunction( |
| 152 | 152 | 'varDump', |
| 153 | - function ($args) { |
|
| 153 | + function($args) { |
|
| 154 | 154 | /** |
| 155 | 155 | * @noinspection ForgottenDebugOutputInspection |
| 156 | 156 | */ |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | */ |
| 169 | 169 | $filter = new \Twig_SimpleFunction( |
| 170 | 170 | 'Pagination', |
| 171 | - function ( |
|
| 171 | + function( |
|
| 172 | 172 | int $total, |
| 173 | 173 | int $current, |
| 174 | 174 | string $linkTemplate, |
@@ -177,9 +177,9 @@ discard block |
||
| 177 | 177 | string $linkItemTemplate = '<a href="(href)" class="(link_class)">(text)</a>', |
| 178 | 178 | string $ellipsesTemplate = '<li><a>...</a></li>' |
| 179 | 179 | ) { |
| 180 | - $items = ''; |
|
| 180 | + $items = ''; |
|
| 181 | 181 | $pageGroupLimit = 3; |
| 182 | - $useEllipses = ($total >10) ? 1 : 0; |
|
| 182 | + $useEllipses = ($total > 10) ? 1 : 0; |
|
| 183 | 183 | $renderedEllipses = 0; |
| 184 | 184 | $values = [ |
| 185 | 185 | '(item_class)' => '', |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | '(link_class)' => '', |
| 188 | 188 | '(text)' => '' |
| 189 | 189 | ]; |
| 190 | - for ($i=1; $i <= $total; $i++) { |
|
| 190 | + for ($i = 1; $i <= $total; $i++) { |
|
| 191 | 191 | $values['(link_class)'] = ''; |
| 192 | 192 | $values['(item_class)'] = ''; |
| 193 | 193 | if ($i === $current) { |