Completed
Push — master ( 14cc6a...ccb281 )
by Adam
02:36
created
src/IPub/ConfirmationDialog/Components/BaseControl.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,11 +82,11 @@
 block discarded – undo
82 82
 			$dir = dirname($this->getReflection()->getFileName());
83 83
 
84 84
 			// ...check if extension template is used
85
-			if (is_file($dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile)) {
86
-				$templateFile = $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile;
85
+			if (is_file($dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile)) {
86
+				$templateFile = $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile;
87 87
 
88
-			} elseif (is_file($dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile . '.latte')) {
89
-				$templateFile = $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile . '.latte';
88
+			} elseif (is_file($dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile.'.latte')) {
89
+				$templateFile = $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateFile.'.latte';
90 90
 
91 91
 			} else {
92 92
 				// ...if not throw exception
Please login to merge, or discard this patch.
src/IPub/ConfirmationDialog/Components/Confirmer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@
 block discarded – undo
231 231
 	 */
232 232
 	protected function generateToken() : string
233 233
 	{
234
-		return base_convert(md5(uniqid('confirm' . $this->getName(), TRUE)), 16, 36);
234
+		return base_convert(md5(uniqid('confirm'.$this->getName(), TRUE)), 16, 36);
235 235
 	}
236 236
 
237 237
 	/**
Please login to merge, or discard this patch.
src/IPub/ConfirmationDialog/DI/ConfirmationDialogExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public static function register(Nette\Configurator $config, $extensionName = 'confirmationDialog')
81 81
 	{
82
-		$config->onCompile[] = function (Nette\Configurator $config, Nette\DI\Compiler $compiler) use ($extensionName) {
82
+		$config->onCompile[] = function(Nette\Configurator $config, Nette\DI\Compiler $compiler) use ($extensionName) {
83 83
 			$compiler->addExtension($extensionName, new ConfirmationDialogExtension());
84 84
 		};
85 85
 	}
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	function getTranslationResources()
93 93
 	{
94 94
 		return [
95
-			__DIR__ . '/../Translations'
95
+			__DIR__.'/../Translations'
96 96
 		];
97 97
 	}
98 98
 }
Please login to merge, or discard this patch.
src/IPub/ConfirmationDialog/Components/Control.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		string $layoutFile = NULL,
70 70
 		string $templateFile = NULL
71 71
 	) {
72
-		list(, , $parent, $name) = func_get_args() + [NULL, NULL, NULL, NULL];
72
+		list(,, $parent, $name) = func_get_args() + [NULL, NULL, NULL, NULL];
73 73
 
74 74
 		parent::__construct($parent, $name);
75 75
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	public function getTemplateFile() : string
113 113
 	{
114 114
 		// ...try to get default component layout file
115
-		return $this->templateFile !== NULL ? $this->templateFile : __DIR__ . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default.latte';
115
+		return $this->templateFile !== NULL ? $this->templateFile : __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default.latte';
116 116
 	}
117 117
 
118 118
 	/**
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	 */
204 204
 	protected function createComponentConfirmer() : Application\UI\Multiplier
205 205
 	{
206
-		return new Application\UI\Multiplier((function () {
206
+		return new Application\UI\Multiplier((function() {
207 207
 			// Check if confirmer factory is available
208 208
 			if (!$this->confirmerFactory) {
209 209
 				throw new Exceptions\InvalidStateException('Confirmation control factory does not exist.');
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 			throw new Exceptions\InvalidArgumentException('$name must be string.');
240 240
 		}
241 241
 
242
-		if ((!$this->confirmer = $this['confirmer-' . $name]) || !$this->confirmer->isConfigured()) {
242
+		if ((!$this->confirmer = $this['confirmer-'.$name]) || !$this->confirmer->isConfigured()) {
243 243
 			throw new Exceptions\InvalidStateException(sprintf('Confirmer "%s" do not exist.', $name));
244 244
 		}
245 245
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 		$name = Utils\Strings::substring($signal, 7);
267 267
 		$name{0} = strtolower($name{0});
268 268
 
269
-		if (!$this['confirmer-' . $name]->isConfigured()) {
269
+		if (!$this['confirmer-'.$name]->isConfigured()) {
270 270
 			throw new Exceptions\InvalidArgumentException('Invalid confirmation control.');
271 271
 		}
272 272
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 			// If template was not defined before...
312 312
 			if ($template->getFile() === NULL) {
313 313
 				// ...try to get base component template file
314
-				$layoutFile = $this->layoutFile !== NULL ? $this->layoutFile : __DIR__ . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'layout.latte';
314
+				$layoutFile = $this->layoutFile !== NULL ? $this->layoutFile : __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'layout.latte';
315 315
 				$template->setFile($layoutFile);
316 316
 			}
317 317
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 	 */
333 333
 	private function getConfirmerControl(string $name) : Confirmer
334 334
 	{
335
-		$confirmer = $this->getComponent('confirmer-' . $name);
335
+		$confirmer = $this->getComponent('confirmer-'.$name);
336 336
 
337 337
 		if (!$confirmer instanceof Confirmer) {
338 338
 			throw new Exceptions\InvalidArgumentException(sprintf('Confirmation control "%s" does not exists.', $name));
Please login to merge, or discard this patch.