Passed
Push — master ( 3b511e...70eb45 )
by Adam
02:14
created
src/IPub/ConfirmationDialog/Components/Confirmer.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 		string $templateFile = NULL,
54 54
 		Storage\IStorage $storage
55 55
 	) {
56
-		list(, , $parent, $name) = func_get_args() + [NULL, NULL, NULL, NULL];
56
+		list(,, $parent, $name) = func_get_args() + [NULL, NULL, NULL, NULL];
57 57
 
58 58
 		parent::__construct($storage, $parent, $name);
59 59
 
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	 */
266 266
 	private function generateToken() : string
267 267
 	{
268
-		return base_convert(md5(uniqid('confirm' . $this->getName(), TRUE)), 16, 36);
268
+		return base_convert(md5(uniqid('confirm'.$this->getName(), TRUE)), 16, 36);
269 269
 	}
270 270
 
271 271
 	/**
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,6 @@
 block discarded – undo
20 20
 use Nette\Bridges;
21 21
 use Nette\ComponentModel;
22 22
 use Nette\Forms;
23
-use Nette\Localization;
24
-
25 23
 use IPub\ConfirmationDialog;
26 24
 use IPub\ConfirmationDialog\Exceptions;
27 25
 use IPub\ConfirmationDialog\Storage;
Please login to merge, or discard this patch.
src/IPub/ConfirmationDialog/Components/BaseControl.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -153,8 +153,8 @@
 block discarded – undo
153 153
 		$templateName = preg_replace('/.latte/', '', $templateFile);
154 154
 
155 155
 		// ...check if extension template is used
156
-		if (is_file($dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateName . '.latte')) {
157
-			return $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateName . '.latte';
156
+		if (is_file($dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateName.'.latte')) {
157
+			return $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateName.'.latte';
158 158
 		}
159 159
 
160 160
 		// ...if not throw exception
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\ConfirmationDialog\Exceptions;
24 23
 
25 24
 /**
Please login to merge, or discard this patch.
src/IPub/ConfirmationDialog/Components/Control.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		string $templateFile = NULL,
60 60
 		IConfirmer $confirmerFactory
61 61
 	) {
62
-		list(, , , $parent, $name) = func_get_args() + [NULL, NULL, NULL, NULL, NULL];
62
+		list(,,, $parent, $name) = func_get_args() + [NULL, NULL, NULL, NULL, NULL];
63 63
 
64 64
 		parent::__construct($parent, $name);
65 65
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	public function getTemplateFile() : string
106 106
 	{
107 107
 		// ...try to get default component layout file
108
-		return $this->templateFile !== NULL ? $this->templateFile : __DIR__ . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default.latte';
108
+		return $this->templateFile !== NULL ? $this->templateFile : __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default.latte';
109 109
 	}
110 110
 
111 111
 	/**
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 			throw new Exceptions\InvalidArgumentException('$name must be string.');
233 233
 		}
234 234
 
235
-		if ((!$this->confirmer = $this['confirmer-' . $name]) || !$this->confirmer->isConfigured()) {
235
+		if ((!$this->confirmer = $this['confirmer-'.$name]) || !$this->confirmer->isConfigured()) {
236 236
 			throw new Exceptions\InvalidStateException(sprintf('Confirmer "%s" do not exist.', $name));
237 237
 		}
238 238
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 		$name = Utils\Strings::substring($signal, 7);
260 260
 		$name{0} = strtolower($name{0});
261 261
 
262
-		if (!$this['confirmer-' . $name]->isConfigured()) {
262
+		if (!$this['confirmer-'.$name]->isConfigured()) {
263 263
 			throw new Exceptions\InvalidArgumentException('Invalid confirmation control.');
264 264
 		}
265 265
 
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 			// If template was not defined before...
305 305
 			if ($template->getFile() === NULL) {
306 306
 				// ...try to get base component template file
307
-				$layoutFile = $this->layoutFile !== NULL ? $this->layoutFile : __DIR__ . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'layout.latte';
307
+				$layoutFile = $this->layoutFile !== NULL ? $this->layoutFile : __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'layout.latte';
308 308
 				$template->setFile($layoutFile);
309 309
 			}
310 310
 
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 	 */
326 326
 	private function getConfirmerControl(string $name) : Confirmer
327 327
 	{
328
-		$confirmer = $this->getComponent('confirmer-' . $name);
328
+		$confirmer = $this->getComponent('confirmer-'.$name);
329 329
 
330 330
 		if (!$confirmer instanceof Confirmer) {
331 331
 			throw new Exceptions\InvalidArgumentException(sprintf('Confirmation control "%s" does not exists.', $name));
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
 	/**
128 128
 	 * Add confirmation handler to "dynamicaly named signals"
129 129
 	 *
130
-	 * @param string $nam                      Confirmation/signal name
130
+	 * @param string $name                      Confirmation/signal name
131 131
 	 * @param callback|Utils\Callback $handler Callback called when confirmation succeed
132 132
 	 * @param callback|string $question        Callback ($confirmer, $params) or string containing question text
133 133
 	 * @param callback|string $heading         Callback ($confirmer, $params) or string containing heading text
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -18,9 +18,7 @@
 block discarded – undo
18 18
 
19 19
 use Nette\Application;
20 20
 use Nette\Bridges;
21
-use Nette\Localization;
22 21
 use Nette\Utils;
23
-
24 22
 use IPub\ConfirmationDialog\Exceptions;
25 23
 
26 24
 /**
Please login to merge, or discard this patch.
src/IPub/ConfirmationDialog/DI/ConfirmationDialogExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 	public function getTranslationResources() : array
99 99
 	{
100 100
 		return [
101
-			__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Translations'
101
+			__DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Translations'
102 102
 		];
103 103
 	}
104 104
 }
Please login to merge, or discard this patch.