Completed
Push — master ( 70cc89...900dcc )
by Adam
02:05
created
src/IPub/FlashMessages/Components/Control.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,6 @@
 block discarded – undo
17 17
 use Nette;
18 18
 use Nette\Application;
19 19
 use Nette\Localization;
20
-use Nette\Utils;
21
-
22 20
 use IPub;
23 21
 use IPub\FlashMessages;
24 22
 use IPub\FlashMessages\Exceptions;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		// If template was not defined before...
156 156
 		if ($this->template->getFile() === NULL) {
157 157
 			// ...try to get base component template file
158
-			$templateFile = !empty($this->templateFile) ? $this->templateFile : __DIR__ . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default' . DIRECTORY_SEPARATOR . 'default.latte';
158
+			$templateFile = !empty($this->templateFile) ? $this->templateFile : __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default'.DIRECTORY_SEPARATOR.'default.latte';
159 159
 			$this->template->setFile($templateFile);
160 160
 		}
161 161
 	}
@@ -196,8 +196,8 @@  discard block
 block discarded – undo
196 196
 			$templateName = preg_replace('/.latte/', '', $templateFile);
197 197
 
198 198
 			// ...check if extension template is used
199
-			if (is_file($dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateName . '.latte')) {
200
-				$templateFile = $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateName . '.latte';
199
+			if (is_file($dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateName.'.latte')) {
200
+				$templateFile = $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateName.'.latte';
201 201
 
202 202
 			} else {
203 203
 				// ...if not throw exception
Please login to merge, or discard this patch.
src/IPub/FlashMessages/FlashNotifier.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -16,10 +16,8 @@
 block discarded – undo
16 16
 
17 17
 use Nette;
18 18
 use Nette\Localization;
19
-
20 19
 use Kdyby;
21 20
 use Kdyby\Translation;
22
-
23 21
 use IPub;
24 22
 use IPub\FlashMessages\Adapters;
25 23
 use IPub\FlashMessages\Entities;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -229,8 +229,8 @@
 block discarded – undo
229 229
 	 */
230 230
 	private function checkForAttribute(array $attributes, $type)
231 231
 	{
232
-		foreach($attributes as $attribute) {
233
-			switch($type)
232
+		foreach ($attributes as $attribute) {
233
+			switch ($type)
234 234
 			{
235 235
 				case 'title':
236 236
 					if (is_string($attribute) === TRUE || $attribute instanceof Translation\Phrase || $attribute instanceof Adapters\IPhraseAdapter) {
Please login to merge, or discard this patch.
src/IPub/FlashMessages/Entities/Message.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -267,7 +267,7 @@
 block discarded – undo
267 267
 	 */
268 268
 	public function __toString()
269 269
 	{
270
-		return $this->level . ' ' . ($this->title ? $this->title . ' ' : '') . $this->getMessage();
270
+		return $this->level.' '.($this->title ? $this->title.' ' : '').$this->getMessage();
271 271
 	}
272 272
 
273 273
 	/**
Please login to merge, or discard this patch.
src/IPub/FlashMessages/DI/FlashMessagesExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
 			->setClass(Events\OnResponseHandler::class);
93 93
 
94 94
 		$application = $builder->getDefinition('application');
95
-		$application->addSetup('$service->onResponse[] = ?', ['@' . $this->prefix('onResponseHandler')]);
95
+		$application->addSetup('$service->onResponse[] = ?', ['@'.$this->prefix('onResponseHandler')]);
96 96
 	}
97 97
 
98 98
 	/**
Please login to merge, or discard this patch.