Skip to content

Commit 3f2ca72

Browse files
ISSUE-1477: Added trailing semicolon to scaffolding crud views
1 parent 3a1a94d commit 3f2ca72

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# [4.0.6](https://github.com/phalcon/cphalcon/releases/tag/v4.0.6)
22
## Fixed
33
- Fixed model findFirst return type error [#1478](https://github.com/phalcon/phalcon-devtools/issues/1478)
4+
- Added trailing semicolon to scaffolding crud views getters [#1477](https://github.com/phalcon/phalcon-devtools/issues/1477)
45

56
# [4.0.5](https://github.com/phalcon/cphalcon/releases/tag/v4.0.5) (2021-03-14)
67
## Fixed

src/Builder/Component/Scaffold.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -309,33 +309,33 @@ private function makeField(string $attribute, int $dataType, $relationField, arr
309309
$code .= "\t\t" . '<?php echo $this->tag->select(["' . $attribute . '", $' .
310310
$selectDefinition[$attribute]['varName'] . ', "using" => "' .
311311
$selectDefinition[$attribute]['primaryKey'] . ',' . $selectDefinition[$attribute]['detail'] .
312-
'", "useDummy" => true), "class" => "form-control", "id" => "' . $id . '"] ?>';
312+
'", "useDummy" => true), "class" => "form-control", "id" => "' . $id . '"]; ?>';
313313
} else {
314314
switch ($dataType) {
315315
case Column::TYPE_ENUM: // enum
316316
$code .= "\t\t" . '<?php echo $this->tag->selectStatic(["' . $attribute .
317-
'", [], "class" => "form-control", "id" => "' . $id . '"]) ?>';
317+
'", [], "class" => "form-control", "id" => "' . $id . '"]); ?>';
318318
break;
319319
case Column::TYPE_CHAR:
320320
$code .= "\t\t" . '<?php echo $this->tag->textField(["' . $attribute .
321-
'", "class" => "form-control", "id" => "' . $id . '"]) ?>';
321+
'", "class" => "form-control", "id" => "' . $id . '"]); ?>';
322322
break;
323323
case Column::TYPE_DECIMAL:
324324
case Column::TYPE_INTEGER:
325325
$code .= "\t\t" . '<?php echo $this->tag->textField(["' . $attribute .
326-
'", "type" => "number", "class" => "form-control", "id" => "' . $id . '"]) ?>';
326+
'", "type" => "number", "class" => "form-control", "id" => "' . $id . '"]); ?>';
327327
break;
328328
case Column::TYPE_DATE:
329329
$code .= "\t\t" . '<?php echo $this->tag->textField(["' . $attribute .
330-
'", "type" => "date", "class" => "form-control", "id" => "' . $id . '"]) ?>';
330+
'", "type" => "date", "class" => "form-control", "id" => "' . $id . '"]); ?>';
331331
break;
332332
case Column::TYPE_TEXT:
333333
$code .= "\t\t" . '<?php echo $this->tag->textArea(["' . $attribute .
334-
'", "cols" => 30, "rows" => 4, "class" => "form-control", "id" => "' . $id . '"]) ?>';
334+
'", "cols" => 30, "rows" => 4, "class" => "form-control", "id" => "' . $id . '"]); ?>';
335335
break;
336336
default:
337337
$code .= "\t\t" . '<?php echo $this->tag->textField(["' . $attribute .
338-
'", "size" => 30, "class" => "form-control", "id" => "' . $id . '"]) ?>';
338+
'", "size" => 30, "class" => "form-control", "id" => "' . $id . '"]); ?>';
339339
break;
340340
}
341341
}
@@ -565,8 +565,8 @@ private function makeLayouts()
565565
// View model layout
566566
$code = '';
567567
if ($this->options->has('theme')) {
568-
$code .= '<?php $this->tag->stylesheetLink("themes/lightness/style") ?>'.PHP_EOL;
569-
$code .= '<?php $this->tag->stylesheetLink("themes/base") ?>'.PHP_EOL;
568+
$code .= '<?php $this->tag->stylesheetLink("themes/lightness/style"); ?>'.PHP_EOL;
569+
$code .= '<?php $this->tag->stylesheetLink("themes/base"); ?>'.PHP_EOL;
570570
$code .= '<div class="ui-layout" align="center">' . PHP_EOL;
571571
} else {
572572
$code .= '<div class="center-block">' . PHP_EOL;
@@ -733,9 +733,9 @@ private function makeViewSearch(): void
733733
} else {
734734
$detailField = ucfirst($this->options->get('allReferences')[$fieldName]['detail']);
735735
$rowCode .= '$' . $this->options->get('singular') . '->get' .
736-
$this->options->get('allReferences')[$fieldName]['tableName'] . '()->get' . $detailField . '()';
736+
$this->options->get('allReferences')[$fieldName]['tableName'] . '()->get' . $detailField . '();';
737737
}
738-
$rowCode .= ' ?></td>' . PHP_EOL;
738+
$rowCode .= '; ?></td>' . PHP_EOL;
739739
}
740740

741741
$idField = $this->options->get('attributes')[0];

0 commit comments

Comments
 (0)