@@ -18,7 +18,6 @@ |
||
18 | 18 | |
19 | 19 | use Nette\Application; |
20 | 20 | use Nette\Localization; |
21 | - |
|
22 | 21 | use IPub\Widgets\Exceptions; |
23 | 22 | |
24 | 23 | /** |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @date 24.07.13 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\Widgets\Application\UI; |
18 | 18 | |
@@ -70,11 +70,11 @@ discard block |
||
70 | 70 | $dir = dirname($this->getReflection()->getFileName()); |
71 | 71 | |
72 | 72 | // ...check if extension template is used |
73 | - if (is_file($dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile)) { |
|
74 | - $templateFile = $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile; |
|
73 | + if (is_file($dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile)) { |
|
74 | + $templateFile = $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile; |
|
75 | 75 | |
76 | - } else if (is_file($dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile . '.latte')) { |
|
77 | - $templateFile = $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile . '.latte'; |
|
76 | + } else if (is_file($dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile.'.latte')) { |
|
77 | + $templateFile = $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile.'.latte'; |
|
78 | 78 | |
79 | 79 | } else { |
80 | 80 | // ...if not throw exception |
@@ -19,7 +19,6 @@ |
||
19 | 19 | use Nette\Application; |
20 | 20 | use Nette\Bridges; |
21 | 21 | use Nette\Localization; |
22 | - |
|
23 | 22 | use IPub\Widgets; |
24 | 23 | use IPub\Widgets\Decorators; |
25 | 24 | use IPub\Widgets\Exceptions; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @date 18.06.15 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\Widgets\Decorators; |
18 | 18 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $dir = dirname($this->getReflection()->getFileName()); |
58 | 58 | |
59 | 59 | // ...try to get base component template file |
60 | - $templateFile = $this->templateFile !== NULL && is_file($this->templateFile) ? $this->templateFile : $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default.latte'; |
|
60 | + $templateFile = $this->templateFile !== NULL && is_file($this->templateFile) ? $this->templateFile : $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default.latte'; |
|
61 | 61 | $this->template->setFile($templateFile); |
62 | 62 | } |
63 | 63 |
@@ -21,7 +21,6 @@ |
||
21 | 21 | use Nette\ComponentModel; |
22 | 22 | use Nette\Localization; |
23 | 23 | use Nette\Utils; |
24 | - |
|
25 | 24 | use IPub\Widgets; |
26 | 25 | use IPub\Widgets\Entities; |
27 | 26 | use IPub\Widgets\Exceptions; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @date 15.09.14 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\Widgets\Widgets; |
18 | 18 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | ->render(); |
123 | 123 | |
124 | 124 | // Modify widget name |
125 | - $name = $title . mb_substr($name, $pos); |
|
125 | + $name = $title.mb_substr($name, $pos); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | // If widget name has subtitle... |
@@ -139,19 +139,19 @@ discard block |
||
139 | 139 | ->render(); |
140 | 140 | |
141 | 141 | // Split name to title & subtitle |
142 | - $name = $title . $subtitle; |
|
142 | + $name = $title.$subtitle; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | // Set badge if exists |
146 | 146 | if ($badge = $this->data->getBadge()) { |
147 | 147 | $badge = Utils\Html::el('i') |
148 | - ->addAttributes(['class' => 'badge badge-' . $badge]); |
|
148 | + ->addAttributes(['class' => 'badge badge-'.$badge]); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | // Set icon if exists |
152 | 152 | if ($icon = $this->data->getIcon()) { |
153 | 153 | $icon = Utils\Html::el('i') |
154 | - ->addAttributes(['class' => 'ipub-icon ipub-icon-' . $icon]); |
|
154 | + ->addAttributes(['class' => 'ipub-icon ipub-icon-'.$icon]); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | // Assign basic widget data to template |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $dir = dirname($this->getReflection()->getFileName()); |
181 | 181 | |
182 | 182 | // ...try to get base component template file |
183 | - $templateFile = $this->templateFile !== NULL && is_file($this->templateFile) ? $this->templateFile : $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default.latte'; |
|
183 | + $templateFile = $this->templateFile !== NULL && is_file($this->templateFile) ? $this->templateFile : $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default.latte'; |
|
184 | 184 | $this->template->setFile($templateFile); |
185 | 185 | } |
186 | 186 | } |
@@ -21,14 +21,12 @@ |
||
21 | 21 | use Nette\ComponentModel; |
22 | 22 | use Nette\Localization; |
23 | 23 | use Nette\Utils; |
24 | - |
|
25 | 24 | use IPub\Widgets\Application\UI; |
26 | 25 | use IPub\Widgets\Decorators; |
27 | 26 | use IPub\Widgets\Entities; |
28 | 27 | use IPub\Widgets\Exceptions; |
29 | 28 | use IPub\Widgets\Managers; |
30 | 29 | use IPub\Widgets\Widgets; |
31 | -use Tracy\Debugger; |
|
32 | 30 | |
33 | 31 | /** |
34 | 32 | * Widgets container control definition |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @date 24.07.13 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\Widgets\Components; |
18 | 18 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $dir = dirname($this->getReflection()->getFileName()); |
170 | 170 | |
171 | 171 | // ...try to get base component template file |
172 | - $templateFile = $this->templateFile !== NULL && is_file($this->templateFile) ? $this->templateFile : $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default.latte'; |
|
172 | + $templateFile = $this->templateFile !== NULL && is_file($this->templateFile) ? $this->templateFile : $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default.latte'; |
|
173 | 173 | $this->template->setFile($templateFile); |
174 | 174 | } |
175 | 175 | |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | $widget = $factory->create($data); |
322 | 322 | |
323 | 323 | // Add widget component to container/position |
324 | - $positionContainer->addComponent($widget, ($widget->getName() . spl_object_hash($data))); |
|
324 | + $positionContainer->addComponent($widget, ($widget->getName().spl_object_hash($data))); |
|
325 | 325 | |
326 | 326 | return $widget; |
327 | 327 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @date 18.06.15 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\Widgets\Decorators\Raw; |
18 | 18 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @date 18.06.15 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\Widgets\Decorators\Raw; |
18 | 18 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @date 18.06.15 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\Widgets\Decorators; |
18 | 18 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @date 16.09.14 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\Widgets\Decorators; |
18 | 18 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @date 10.10.14 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\Widgets\Latte; |
18 | 18 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | return "/* line $node->startLine */ " |
93 | 93 | . ($name[0] === '$' ? "if (is_object($name)) \$_tmp = $name; else " : '') |
94 | - . '$_tmp = $this->global->uiControl->getComponent('. $prefix . $name . '); ' |
|
94 | + . '$_tmp = $this->global->uiControl->getComponent('.$prefix.$name.'); ' |
|
95 | 95 | . 'if ($_tmp instanceof Nette\Application\UI\IRenderable) $_tmp->redrawControl(NULL, FALSE); ' |
96 | 96 | . ($node->modifiers === '' |
97 | 97 | ? "\$_tmp->$method($param);" |