Skip to content

Commit cd8c891

Browse files
committed
ci(github): PHP 7.2 is the minimal requirement
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent c126794 commit cd8c891

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: "ubuntu-latest"
2424
strategy:
2525
matrix:
26-
php-versions: [7.4]
26+
php-versions: [7.2]
2727
env:
2828
- { GLPI_BRANCH: 9.5/bugfixes, SKIP_FUNCTIONAL_TESTS: false }
2929
services:

inc/field/emailfield.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
class EmailField extends TextField
4040
{
41-
public function getDesignSpecializationField()
41+
public function getDesignSpecializationField(): array
4242
{
4343
$rand = mt_rand();
4444

@@ -72,7 +72,7 @@ public function getDesignSpecializationField()
7272
];
7373
}
7474

75-
public function getRenderedHtml($canEdit = true)
75+
public function getRenderedHtml($canEdit = true): string
7676
{
7777
if (!$canEdit) {
7878
return $this->value;
@@ -140,7 +140,7 @@ public function hasInput($input): bool
140140
return isset($input['formcreator_field_' . $this->question->getID()]);
141141
}
142142

143-
public function parseAnswerValues($input, $nonDestructive = false)
143+
public function parseAnswerValues($input, $nonDestructive = false): bool
144144
{
145145
$key = 'formcreator_field_' . $this->question->getID();
146146
if (!isset($input[$key])) {
@@ -188,7 +188,7 @@ public function isAnonymousFormCompatible(): bool
188188
return true;
189189
}
190190

191-
public function getHtmlIcon()
191+
public function getHtmlIcon(): string
192192
{
193193
return '<i class="fa fa-envelope" aria-hidden="true"></i>';
194194
}

inc/field/ldapselectfield.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public function serializeValue(): string
185185
return $this->value;
186186
}
187187

188-
public function deserializeValue($value): string
188+
public function deserializeValue($value)
189189
{
190190
$this->value = $value;
191191
}
@@ -311,7 +311,7 @@ public function isAnonymousFormCompatible(): bool
311311
return false;
312312
}
313313

314-
public function getHtmlIcon():string
314+
public function getHtmlIcon(): string
315315
{
316316
return '<i class="fa fa-sitemap" aria-hidden="true"></i>';
317317
}

inc/field/textareafield.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,12 @@ public function prepareQuestionInputForSave($input): array
196196
return $input;
197197
}
198198

199-
public function hasInput($input) : bool
199+
public function hasInput($input): bool
200200
{
201201
return isset($input['formcreator_field_' . $this->question->getID()]);
202202
}
203203

204-
public function parseAnswerValues($input, $nonDestructive = false)
204+
public function parseAnswerValues($input, $nonDestructive = false): bool
205205
{
206206
parent::parseAnswerValues($input, $nonDestructive);
207207
$key = 'formcreator_field_' . $this->question->getID();
@@ -244,7 +244,7 @@ public function lessThan($value): bool
244244
return !$this->greaterThan($value) && !$this->equals($value);
245245
}
246246

247-
public function isAnonymousFormCompatible()
247+
public function isAnonymousFormCompatible(): bool
248248
{
249249
return true;
250250
}

inc/field/textfield.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function deserializeValue($value)
127127
: '';
128128
}
129129

130-
public function getValueForDesign()
130+
public function getValueForDesign(): string
131131
{
132132
if ($this->value === null) {
133133
return '';
@@ -198,7 +198,7 @@ public function isValidValue($value): bool
198198
return true;
199199
}
200200

201-
public static function getName()
201+
public static function getName(): string
202202
{
203203
return __('Text', 'formcreator');
204204
}

0 commit comments

Comments
 (0)