@@ -28,8 +28,7 @@ |
||
| 28 | 28 | if($data->id > 0 && $address=$finder->findByPk($data->id)) |
| 29 | 29 | { |
| 30 | 30 | return $address->copyFrom($data)->save(); |
| 31 | - } |
|
| 32 | - else |
|
| 31 | + } else |
|
| 33 | 32 | { |
| 34 | 33 | $data->id = null; //nullify the id |
| 35 | 34 | return $data->save(); |
@@ -76,8 +76,9 @@ |
||
| 76 | 76 | |
| 77 | 77 | public function toggleColumnVisibility($sender,$param) |
| 78 | 78 | { |
| 79 | - foreach($this->DataGrid->Columns as $index=>$column) |
|
| 80 | - $column->Visible=$sender->Items[$index]->Selected; |
|
| 79 | + foreach($this->DataGrid->Columns as $index=>$column) { |
|
| 80 | + $column->Visible=$sender->Items[$index]->Selected; |
|
| 81 | + } |
|
| 81 | 82 | $this->DataGrid->DataSource=$this->Data; |
| 82 | 83 | $this->DataGrid->dataBind(); |
| 83 | 84 | } |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | if($param instanceof TCommandEventParameter) |
| 8 | 8 | { |
| 9 | 9 | $this->Result2->Text="Command name: $param->CommandName, Command parameter: $param->CommandParameter"; |
| 10 | - } |
|
| 11 | - else |
|
| 10 | + } else |
|
| 12 | 11 | { |
| 13 | 12 | $this->Result->Text="You clicked at ($param->X,$param->Y)"; |
| 14 | 13 | } |
@@ -34,8 +34,7 @@ discard block |
||
| 34 | 34 | if ($sender->getChecked()) { |
| 35 | 35 | $this->drop1->getOptions()->accept = '.drag-lime'; |
| 36 | 36 | $this->label1a->Text="is accepting lime draggable"; |
| 37 | - } |
|
| 38 | - else { |
|
| 37 | + } else { |
|
| 39 | 38 | $this->drop1->getOptions()->accept = ''; |
| 40 | 39 | $this->label1a->Text="is NOT accepting lime draggable"; |
| 41 | 40 | } |
@@ -45,8 +44,7 @@ discard block |
||
| 45 | 44 | if ($sender->getChecked()) { |
| 46 | 45 | $this->drop2->getOptions()->activeClass = 'active'; |
| 47 | 46 | $this->label2a->Text="is highlighted while dragging"; |
| 48 | - } |
|
| 49 | - else { |
|
| 47 | + } else { |
|
| 50 | 48 | $this->drop2->getOptions()->activeClass = ''; |
| 51 | 49 | $this->label2a->Text="is NOT highlighted while dragging"; |
| 52 | 50 | } |
@@ -25,7 +25,9 @@ |
||
| 25 | 25 | public function repeater1_onStop($sender, $param) |
| 26 | 26 | { |
| 27 | 27 | $items = $param->getCallbackParameter()->index; |
| 28 | - foreach ($items as $key => $index) $items[$key] = $this->data[$index]; |
|
| 28 | + foreach ($items as $key => $index) { |
|
| 29 | + $items[$key] = $this->data[$index]; |
|
| 30 | + } |
|
| 29 | 31 | $this->label1->Text = implode(' ', $items); |
| 30 | 32 | } |
| 31 | 33 | |
@@ -25,7 +25,9 @@ |
||
| 25 | 25 | public function repeater1_onStop($sender, $param) |
| 26 | 26 | { |
| 27 | 27 | $order = $param->getCallbackParameter()->index; |
| 28 | - foreach ($order as $key => $index) $order[$key] = $this->data[$index]; |
|
| 28 | + foreach ($order as $key => $index) { |
|
| 29 | + $order[$key] = $this->data[$index]; |
|
| 30 | + } |
|
| 29 | 31 | $this->label1->Text = implode(' ', $order); |
| 30 | 32 | } |
| 31 | 33 | |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | if($param instanceof TCallbackEventParameter) |
| 8 | 8 | { |
| 9 | 9 | $this->Result2->Text="Callback parameter: $param->CallbackParameter"; |
| 10 | - } |
|
| 11 | - else |
|
| 10 | + } else |
|
| 12 | 11 | { |
| 13 | 12 | $this->Result->Text="You clicked at ($param->X,$param->Y)"; |
| 14 | 13 | } |
@@ -127,8 +127,7 @@ |
||
| 127 | 127 | { |
| 128 | 128 | $this->categoryDao->addNewCategory($category); |
| 129 | 129 | $this->pass(); |
| 130 | - } |
|
| 131 | - catch(TSqlMapQueryExecutionException $e) |
|
| 130 | + } catch(TSqlMapQueryExecutionException $e) |
|
| 132 | 131 | { |
| 133 | 132 | $this->fail(); |
| 134 | 133 | } |
@@ -114,8 +114,7 @@ |
||
| 114 | 114 | { |
| 115 | 115 | $this->projectDao->addUserToProject($project->ID, 'asd'); |
| 116 | 116 | $this->fail(); |
| 117 | - } |
|
| 118 | - catch(TDbException $e) |
|
| 117 | + } catch(TDbException $e) |
|
| 119 | 118 | { |
| 120 | 119 | $this->pass(); |
| 121 | 120 | } |