Completed
Push — master ( 082f5b...3c6fd9 )
by Adam
06:38
created
src/IPub/Application/UI/TEntityState.php 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -14,10 +14,8 @@
 block discarded – undo
14 14
 
15 15
 namespace IPub\Application\UI;
16 16
 
17
-use Nette;
18 17
 use Nette\Application;
19 18
 use Nette\Application\UI;
20
-use Tracy\Debugger;
21 19
 
22 20
 /**
23 21
  * Entity call implementation into presenters and controls
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 				$type = gettype($meta['def']);
61 61
 
62 62
 				if (!$reflection->convertType($params[$name], $type)) {
63
-					throw new Application\BadRequestException("Invalid value for persistent parameter '$name' in '{$this->getName()}', expected " . ($type === 'NULL' ? 'scalar' : $type) . ".");
63
+					throw new Application\BadRequestException("Invalid value for persistent parameter '$name' in '{$this->getName()}', expected ".($type === 'NULL' ? 'scalar' : $type).".");
64 64
 				}
65 65
 
66 66
 				$this->$name = $params[$name];
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,8 @@  discard block
 block discarded – undo
56 56
 		$reflection = $this->getReflection();
57 57
 
58 58
 		foreach ($reflection->getPersistentParams() as $name => $meta) {
59
-			if (isset($params[$name])) { // NULLs are ignored
59
+			if (isset($params[$name])) {
60
+// NULLs are ignored
60 61
 				$type = gettype($meta['def']);
61 62
 
62 63
 				if (!$reflection->convertType($params[$name], $type)) {
@@ -111,7 +112,8 @@  discard block
 block discarded – undo
111 112
 			if (isset($params[$name])) {
112 113
 				// injected value
113 114
 
114
-			} else if (array_key_exists($name, $params)) { // NULLs are skipped
115
+			} else if (array_key_exists($name, $params)) {
116
+// NULLs are skipped
115 117
 				continue;
116 118
 
117 119
 			} elseif (!isset($meta['since']) || $this instanceof $meta['since']) {
Please login to merge, or discard this patch.
src/IPub/Application/UI/TJsonPresenter.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 namespace IPub\Application\UI;
16 16
 
17 17
 use Nette;
18
-
19 18
 use IPub\Application;
20 19
 
21 20
 /**
Please login to merge, or discard this patch.
src/IPub/Application/UI/TRedirect.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,6 @@
 block discarded – undo
16 16
 
17 17
 use Nette;
18 18
 use Nette\Application;
19
-use Nette\Application\Responses;
20 19
 
21 20
 /**
22 21
  * Add improved redirects & forwarding into presenters & components
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
 		if ($presenter->isAjax()) {
49 49
 			if ($destination === 'this') {
50
-				foreach($snippets as $snippet) {
50
+				foreach ($snippets as $snippet) {
51 51
 					$this->redrawControl($snippet);
52 52
 				}
53 53
 
Please login to merge, or discard this patch.
src/IPub/Application/UI/TRestPresenter.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -16,9 +16,7 @@
 block discarded – undo
16 16
 
17 17
 use Nette;
18 18
 use Nette\Utils;
19
-
20 19
 use Tracy\Debugger;
21
-
22 20
 use IPub\Application;
23 21
 
24 22
 /**
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	protected function returnResponse($data = array())
81 81
 	{
82
-		$this->response->status	= 'success';
83
-		$this->response->data	= $data;
82
+		$this->response->status = 'success';
83
+		$this->response->data = $data;
84 84
 	}
85 85
 
86 86
 	/**
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 */
89 89
 	protected function checkMethodRequest()
90 90
 	{
91
-		$methodName = 'action' . Utils\Strings::firstUpper($this->action);
91
+		$methodName = 'action'.Utils\Strings::firstUpper($this->action);
92 92
 		$rc = $this->getReflection();
93 93
 
94 94
 		if ($rc->hasMethod($methodName) && $method = $rc->getMethod($methodName)) {
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 				$request = $this->getHttpRequest();
97 97
 
98 98
 				if (Utils\Strings::lower($annotation) !== Utils\Strings::lower($request->getMethod())) {
99
-					throw new Nette\InvalidStateException('Bad method for this request. ' . __CLASS__ . '::' . $methodName);
99
+					throw new Nette\InvalidStateException('Bad method for this request. '.__CLASS__.'::'.$methodName);
100 100
 				}
101 101
 			}
102 102
 		}
Please login to merge, or discard this patch.