Passed
Push — master ( 20cedb...fb1494 )
by Adam
02:04
created
src/IPub/Widgets/Application/UI/BaseControl.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,11 +66,11 @@
 block discarded – undo
66 66
 			$dir = dirname($this->getReflection()->getFileName());
67 67
 
68 68
 			// ...check if extension template is used
69
-			if (is_file($dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile)) {
70
-				$templateFile = $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile;
69
+			if (is_file($dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile)) {
70
+				$templateFile = $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile;
71 71
 
72
-			} else if (is_file($dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile . '.latte')) {
73
-				$templateFile = $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile . '.latte';
72
+			} else if (is_file($dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile.'.latte')) {
73
+				$templateFile = $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile.'.latte';
74 74
 
75 75
 			} else {
76 76
 				// ...if not throw exception
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,6 @@
 block discarded – undo
18 18
 
19 19
 use Nette\Application;
20 20
 use Nette\Localization;
21
-
22 21
 use IPub\Widgets\Exceptions;
23 22
 
24 23
 /**
Please login to merge, or discard this patch.
src/IPub/Widgets/Decorators/Decorator.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 				$dir = dirname($this->getReflection()->getFileName());
57 57
 
58 58
 				// ...try to get base component template file
59
-				$templateFile = $this->templateFile !== NULL && is_file($this->templateFile) ? $this->templateFile : $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default.latte';
59
+				$templateFile = $this->templateFile !== NULL && is_file($this->templateFile) ? $this->templateFile : $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default.latte';
60 60
 				$this->template->setFile($templateFile);
61 61
 			}
62 62
 
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/IPub/Widgets/DI/WidgetsExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
 			// Register widget to manager and group
134 134
 			foreach ($groups as $group) {
135
-				$widgetsManager->addSetup('register', ['@' . $serviceName, $serviceName, $group]);
135
+				$widgetsManager->addSetup('register', ['@'.$serviceName, $serviceName, $group]);
136 136
 			}
137 137
 		}
138 138
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 		// Get all registered widgets decorators
143 143
 		foreach (array_keys($builder->findByTag(self::TAG_WIDGET_DECORATOR)) as $serviceName) {
144 144
 			// Register decorator to manager
145
-			$decoratorsManager->addSetup('register', ['@' . $serviceName, $serviceName]);
145
+			$decoratorsManager->addSetup('register', ['@'.$serviceName, $serviceName]);
146 146
 		}
147 147
 
148 148
 		// Get widgets filters manager
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 			$priority = 999;
154 154
 
155 155
 			// Register filter to manager
156
-			$filtersManager->addSetup('register', ['@' . $serviceName, $serviceName, $priority]);
156
+			$filtersManager->addSetup('register', ['@'.$serviceName, $serviceName, $priority]);
157 157
 		}
158 158
 
159 159
 		// Get widgets control provider
Please login to merge, or discard this patch.
src/IPub/Widgets/Components/Control.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 				$dir = dirname($this->getReflection()->getFileName());
167 167
 
168 168
 				// ...try to get base component template file
169
-				$templateFile = $this->templateFile !== NULL && is_file($this->templateFile) ? $this->templateFile : $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default.latte';
169
+				$templateFile = $this->templateFile !== NULL && is_file($this->templateFile) ? $this->templateFile : $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default.latte';
170 170
 				$this->template->setFile($templateFile);
171 171
 			}
172 172
 
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 		$widget = $factory->create($data);
309 309
 
310 310
 		// Add widget component to container/position
311
-		$positionContainer->addComponent($widget, ($widget->getName() . spl_object_hash($data)));
311
+		$positionContainer->addComponent($widget, ($widget->getName().spl_object_hash($data)));
312 312
 
313 313
 		return $widget;
314 314
 	}
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/IPub/Widgets/Widgets/Widget.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 				->render();
126 126
 
127 127
 			// Modify widget name
128
-			$name = $title . mb_substr($name, $pos);
128
+			$name = $title.mb_substr($name, $pos);
129 129
 		}
130 130
 
131 131
 		// If widget name has subtitle...
@@ -142,19 +142,19 @@  discard block
 block discarded – undo
142 142
 				->render();
143 143
 
144 144
 			// Split name to title & subtitle
145
-			$name = $title . $subtitle;
145
+			$name = $title.$subtitle;
146 146
 		}
147 147
 
148 148
 		// Set badge if exists
149 149
 		if ($badge = $this->data->getBadge()) {
150 150
 			$badge = Utils\Html::el('i')
151
-				->addAttributes(['class' => 'badge badge-' . $badge]);
151
+				->addAttributes(['class' => 'badge badge-'.$badge]);
152 152
 		}
153 153
 
154 154
 		// Set icon if exists
155 155
 		if ($icon = $this->data->getIcon()) {
156 156
 			$icon = Utils\Html::el('i')
157
-				->addAttributes(['class' => 'ipub-icon ipub-icon-' . $icon]);
157
+				->addAttributes(['class' => 'ipub-icon ipub-icon-'.$icon]);
158 158
 		}
159 159
 
160 160
 		// Assign basic widget data to template
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 			$dir = dirname($this->getReflection()->getFileName());
184 184
 
185 185
 			// ...try to get base component template file
186
-			$templateFile = $this->templateFile !== NULL && is_file($this->templateFile) ? $this->templateFile : $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default.latte';
186
+			$templateFile = $this->templateFile !== NULL && is_file($this->templateFile) ? $this->templateFile : $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default.latte';
187 187
 			$this->template->setFile($templateFile);
188 188
 		}
189 189
 	}
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/IPub/Widgets/Latte/Macros.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
 
94 94
 		return "/* line $node->startLine */ "
95 95
 		. ($name[0] === '$' ? "if (is_object($name)) \$_tmp = $name; else " : '')
96
-		. '$_tmp = $this->global->uiControl->getComponent('. $prefix . $name . '); '
96
+		. '$_tmp = $this->global->uiControl->getComponent('.$prefix.$name.'); '
97 97
 		. 'if ($_tmp instanceof Nette\Application\UI\IRenderable) $_tmp->redrawControl(NULL, FALSE); '
98 98
 		. ($node->modifiers === ''
99 99
 			? "\$_tmp->$method($param);"
Please login to merge, or discard this patch.