@@ -14,10 +14,8 @@ |
||
| 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 |
@@ -60,7 +60,7 @@ |
||
| 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]; |
@@ -56,7 +56,8 @@ discard block |
||
| 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 |
||
| 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']) { |
@@ -15,7 +15,6 @@ |
||
| 15 | 15 | namespace IPub\Application\UI; |
| 16 | 16 | |
| 17 | 17 | use Nette; |
| 18 | - |
|
| 19 | 18 | use IPub\Application; |
| 20 | 19 | |
| 21 | 20 | /** |
@@ -16,7 +16,6 @@ |
||
| 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 |
@@ -47,7 +47,7 @@ |
||
| 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 | |
@@ -16,9 +16,7 @@ |
||
| 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 | /** |
@@ -79,8 +79,8 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |