@@ -14,7 +14,6 @@ |
||
14 | 14 | |
15 | 15 | namespace IPub\FormSlug\Utils; |
16 | 16 | |
17 | -use Nette; |
|
18 | 17 | use Nette\Utils; |
19 | 18 | use Nette\Bridges; |
20 | 19 |
@@ -88,7 +88,7 @@ |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | if ($indent !== NULL) { |
91 | - return "\n" . str_repeat("\t", $indent - 1) . $s . "\n" . str_repeat("\t", max(0, $indent - 2)); |
|
91 | + return "\n".str_repeat("\t", $indent - 1).$s."\n".str_repeat("\t", max(0, $indent - 2)); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | return $s; |
@@ -14,11 +14,9 @@ |
||
14 | 14 | |
15 | 15 | namespace IPub\FormSlug\Controls; |
16 | 16 | |
17 | -use Nette; |
|
18 | 17 | use Nette\Application\UI; |
19 | 18 | use Nette\Bridges; |
20 | 19 | use Nette\Forms; |
21 | - |
|
22 | 20 | use IPub; |
23 | 21 | use IPub\FormSlug; |
24 | 22 | use IPub\FormSlug\Exceptions; |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | $template->settings = [ |
129 | 129 | 'toggle' => $this->toggleBox, |
130 | 130 | 'onetime' => $this->onetimeAutoUpdate, |
131 | - 'fields' => (array_reduce($this->fields, function (array $result, Forms\Controls\BaseControl $row) { |
|
132 | - $result[] = '#' . $row->getHtmlId(); |
|
131 | + 'fields' => (array_reduce($this->fields, function(array $result, Forms\Controls\BaseControl $row) { |
|
132 | + $result[] = '#'.$row->getHtmlId(); |
|
133 | 133 | |
134 | 134 | return $result; |
135 | 135 | }, [])), |
@@ -166,8 +166,8 @@ discard block |
||
166 | 166 | // Check if template file exists... |
167 | 167 | if (!is_file($templateFile)) { |
168 | 168 | // ...check if extension template is used |
169 | - if (is_file(__DIR__ . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile)) { |
|
170 | - $templateFile = __DIR__ . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile; |
|
169 | + if (is_file(__DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile)) { |
|
170 | + $templateFile = __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile; |
|
171 | 171 | |
172 | 172 | } else { |
173 | 173 | // ...if not throw exception |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | */ |
184 | 184 | private function getTemplateFile() : string |
185 | 185 | { |
186 | - return $this->templateFile !== NULL ? $this->templateFile : __DIR__ . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default.latte'; |
|
186 | + return $this->templateFile !== NULL ? $this->templateFile : __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default.latte'; |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | /** |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | |
204 | 204 | $class = function_exists('get_called_class') ? get_called_class() : __CLASS__; |
205 | 205 | Forms\Container::extensionMethod( |
206 | - $method, function (Forms\Container $form, $name, $label = NULL, $maxLength = NULL) use ($class, $templateFactory) { |
|
206 | + $method, function(Forms\Container $form, $name, $label = NULL, $maxLength = NULL) use ($class, $templateFactory) { |
|
207 | 207 | $component = new $class($templateFactory, $label, $maxLength); |
208 | 208 | $form->addComponent($component, $name); |
209 | 209 |