Skip to content

Commit 8120b73

Browse files
committed
added PHP 7.1 scalar and return type hints
1 parent 4b645bb commit 8120b73

30 files changed

+264
-610
lines changed

examples/custom-control.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ public function getValue()
6161
/**
6262
* @return bool
6363
*/
64-
public function isFilled()
64+
public function isFilled(): bool
6565
{
6666
return $this->day !== '' || $this->year !== '';
6767
}
6868

6969

70-
public function loadHttpData()
70+
public function loadHttpData(): void
7171
{
7272
$this->day = $this->getHttpData(Form::DATA_LINE, '[day]');
7373
$this->month = $this->getHttpData(Form::DATA_LINE, '[month]');

src/Bridges/FormsLatte/Runtime.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ class Runtime
2424

2525
/**
2626
* Renders form begin.
27-
* @return string
2827
*/
29-
public static function renderFormBegin(Form $form, array $attrs, $withTags = TRUE)
28+
public static function renderFormBegin(Form $form, array $attrs, bool $withTags = TRUE): string
3029
{
3130
$form->fireRenderEvents();
3231
foreach ($form->getControls() as $control) {
@@ -45,9 +44,8 @@ public static function renderFormBegin(Form $form, array $attrs, $withTags = TRU
4544

4645
/**
4746
* Renders form end.
48-
* @return string
4947
*/
50-
public static function renderFormEnd(Form $form, $withTags = TRUE)
48+
public static function renderFormEnd(Form $form, bool $withTags = TRUE): string
5149
{
5250
$s = '';
5351
if ($form->isMethod('get')) {

0 commit comments

Comments
 (0)