@@ -107,7 +107,7 @@ |
||
107 | 107 | if (($total = count($fkObjects)) > 0) { |
108 | 108 | $source = $this->getSourceRecord(); |
109 | 109 | $fkeys = $this->findForeignKeys($fkObjects[0], $source); |
110 | - for ($i = 0;$i < $total;$i++) { |
|
110 | + for ($i = 0; $i < $total; $i++) { |
|
111 | 111 | foreach ($fkeys as $fKey => $srcKey) { |
112 | 112 | $fkObjects[$i]->setColumnValue($fKey, $source->getColumnValue($srcKey)); |
113 | 113 | } |
@@ -236,8 +236,7 @@ discard block |
||
236 | 236 | public function runQueryForList($connection, $parameter, $sql, $result, $delegate = null) |
237 | 237 | { |
238 | 238 | $registry = $this->getManager()->getTypeHandlers(); |
239 | - $list = $result instanceof \ArrayAccess ? $result : |
|
240 | - $this->_statement->createInstanceOfListClass($registry); |
|
239 | + $list = $result instanceof \ArrayAccess ? $result : $this->_statement->createInstanceOfListClass($registry); |
|
241 | 240 | $connection->setActive(true); |
242 | 241 | $reader = $sql->query(); |
243 | 242 | //$reader = $this->executeSQLQueryLimit($connection, $sql, $max, $skip); |
@@ -313,8 +312,7 @@ discard block |
||
313 | 312 | foreach ($reader as $row) { |
314 | 313 | $obj = $this->applyResultMap($row); |
315 | 314 | $key = TPropertyAccess::get($obj, $keyProperty); |
316 | - $value = ($valueProperty === null) ? $obj : |
|
317 | - TPropertyAccess::get($obj, $valueProperty); |
|
315 | + $value = ($valueProperty === null) ? $obj : TPropertyAccess::get($obj, $valueProperty); |
|
318 | 316 | $param = new TResultSetMapItemParameter($key, $value, $parameter, $map); |
319 | 317 | $this->raiseRowDelegate($delegate, $param); |
320 | 318 | } |
@@ -323,8 +321,7 @@ discard block |
||
323 | 321 | foreach ($reader as $row) { |
324 | 322 | $obj = $this->applyResultMap($row); |
325 | 323 | $key = TPropertyAccess::get($obj, $keyProperty); |
326 | - $map[$key] = ($valueProperty === null) ? $obj : |
|
327 | - TPropertyAccess::get($obj, $valueProperty); |
|
324 | + $map[$key] = ($valueProperty === null) ? $obj : TPropertyAccess::get($obj, $valueProperty); |
|
328 | 325 | } |
329 | 326 | } |
330 | 327 | $this->onExecuteQuery($command); |
@@ -67,7 +67,7 @@ |
||
67 | 67 | 'text' => $this->getText(), |
68 | 68 | 'click' => new TJavaScriptLiteral( |
69 | 69 | "function(){new Prado.Callback('" . $this->getUniqueID() . "', 'onClick');}" |
70 | - )] ; |
|
70 | + )]; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -114,17 +114,17 @@ discard block |
||
114 | 114 | * Indexes for the rare fields. |
115 | 115 | * In order to save memory, rare fields will only be created if they are needed. |
116 | 116 | */ |
117 | - const RF_CONTROLS = 0; // child controls |
|
118 | - const RF_CHILD_STATE = 1; // child state field |
|
119 | - const RF_NAMED_CONTROLS = 2; // list of controls whose namingcontainer is this control |
|
120 | - const RF_NAMED_CONTROLS_ID = 3; // counter for automatic id |
|
121 | - const RF_SKIN_ID = 4; // skin ID |
|
122 | - const RF_DATA_BINDINGS = 5; // data bindings |
|
123 | - const RF_EVENTS = 6; // event handlers |
|
124 | - const RF_CONTROLSTATE = 7; // controlstate |
|
125 | - const RF_NAMED_OBJECTS = 8; // controls declared with ID on template |
|
126 | - const RF_ADAPTER = 9; // adapter |
|
127 | - const RF_AUTO_BINDINGS = 10; // auto data bindings |
|
117 | + const RF_CONTROLS = 0; // child controls |
|
118 | + const RF_CHILD_STATE = 1; // child state field |
|
119 | + const RF_NAMED_CONTROLS = 2; // list of controls whose namingcontainer is this control |
|
120 | + const RF_NAMED_CONTROLS_ID = 3; // counter for automatic id |
|
121 | + const RF_SKIN_ID = 4; // skin ID |
|
122 | + const RF_DATA_BINDINGS = 5; // data bindings |
|
123 | + const RF_EVENTS = 6; // event handlers |
|
124 | + const RF_CONTROLSTATE = 7; // controlstate |
|
125 | + const RF_NAMED_OBJECTS = 8; // controls declared with ID on template |
|
126 | + const RF_ADAPTER = 9; // adapter |
|
127 | + const RF_AUTO_BINDINGS = 10; // auto data bindings |
|
128 | 128 | |
129 | 129 | /** |
130 | 130 | * @var string control ID |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | public function getUniqueID() |
403 | 403 | { |
404 | 404 | if ($this->_uid === '' || $this->_uid === null) { // need to build the UniqueID |
405 | - $this->_uid = ''; // set to not-null, so that clearCachedUniqueID() may take action |
|
405 | + $this->_uid = ''; // set to not-null, so that clearCachedUniqueID() may take action |
|
406 | 406 | if ($namingContainer = $this->getNamingContainer()) { |
407 | 407 | if ($this->getPage() === $namingContainer) { |
408 | 408 | return ($this->_uid = $this->_id); |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | public function getVisible($checkParents = true) |
569 | 569 | { |
570 | 570 | if ($checkParents) { |
571 | - for ($control = $this;$control;$control = $control->_parent) { |
|
571 | + for ($control = $this; $control; $control = $control->_parent) { |
|
572 | 572 | if (!$control->getVisible(false)) { |
573 | 573 | return false; |
574 | 574 | } |
@@ -600,7 +600,7 @@ discard block |
||
600 | 600 | public function getEnabled($checkParents = false) |
601 | 601 | { |
602 | 602 | if ($checkParents) { |
603 | - for ($control = $this;$control;$control = $control->_parent) { |
|
603 | + for ($control = $this; $control; $control = $control->_parent) { |
|
604 | 604 | if (!$control->getViewState('Enabled', true)) { |
605 | 605 | return false; |
606 | 606 | } |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | public function getEnableViewState($checkParents = false) |
703 | 703 | { |
704 | 704 | if ($checkParents) { |
705 | - for ($control = $this;$control !== null;$control = $control->getParent()) { |
|
705 | + for ($control = $this; $control !== null; $control = $control->getParent()) { |
|
706 | 706 | if ($control->_flags & self::IS_DISABLE_VIEWSTATE) { |
707 | 707 | return false; |
708 | 708 | } |
@@ -117,7 +117,7 @@ |
||
117 | 117 | |
118 | 118 | private function generateTokenHash($token) |
119 | 119 | { |
120 | - for ($h = 0,$i = strlen($token) - 1;$i >= 0;--$i) { |
|
120 | + for ($h = 0, $i = strlen($token) - 1; $i >= 0; --$i) { |
|
121 | 121 | $h += ord($token[$i]); |
122 | 122 | } |
123 | 123 | return $h; |
@@ -116,7 +116,7 @@ |
||
116 | 116 | $flag = false; |
117 | 117 | if ($n === count($list2)) { |
118 | 118 | sort($list, SORT_NUMERIC); |
119 | - for ($i = 0;$i < $n;++$i) { |
|
119 | + for ($i = 0; $i < $n; ++$i) { |
|
120 | 120 | if ($list[$i] !== $list2[$i]) { |
121 | 121 | $flag = true; |
122 | 122 | break; |
@@ -295,7 +295,7 @@ |
||
295 | 295 | */ |
296 | 296 | public function getValidationPropertyValue() |
297 | 297 | { |
298 | - return implode(',', array_map(function ($file) { |
|
298 | + return implode(',', array_map(function($file) { |
|
299 | 299 | return $file->getFileName(); |
300 | 300 | }, $this->_files)); |
301 | 301 | } |
@@ -629,7 +629,7 @@ |
||
629 | 629 | $items = $this->getItems(); |
630 | 630 | $hasSeparator = $this->_separatorTemplate !== null || $this->getSeparatorRenderer() !== ''; |
631 | 631 | $this->_header = $this->createItemInternal(-1, TListItemType::Header); |
632 | - for ($i = 0;$i < $itemCount;++$i) { |
|
632 | + for ($i = 0; $i < $itemCount; ++$i) { |
|
633 | 633 | if ($hasSeparator && $i > 0) { |
634 | 634 | $this->createItemInternal($i - 1, TListItemType::Separator); |
635 | 635 | } |
@@ -430,7 +430,7 @@ |
||
430 | 430 | $endLine = $errorLine + self::SOURCE_LINES <= count($lines) ? $errorLine + self::SOURCE_LINES : count($lines); |
431 | 431 | |
432 | 432 | $source = ''; |
433 | - for ($i = $beginLine;$i < $endLine;++$i) { |
|
433 | + for ($i = $beginLine; $i < $endLine; ++$i) { |
|
434 | 434 | if ($i === $errorLine - 1) { |
435 | 435 | $line = htmlspecialchars(sprintf("%04d: %s", $i + 1, str_replace("\t", ' ', $lines[$i]))); |
436 | 436 | $source .= "<div class=\"error\">" . $line . "</div>"; |