Skip to content

Commit 195b468

Browse files
committed
fix: run cs:fix
Signed-off-by: Vitor Mattos <[email protected]>
1 parent 43e8d5b commit 195b468

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

lib/Service/Certificate/RulesService.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ class RulesService {
4242

4343
public function __construct(
4444
protected IL10N $l10n,
45-
)
46-
{
45+
) {
4746

4847
}
4948

5049
public function getRule(string $fieldName): array {
51-
if(!isset($this->rules[$fieldName]['helperText'])){
50+
if (!isset($this->rules[$fieldName]['helperText'])) {
5251
$this->rules[$fieldName]['helperText'] = $this->getHelperText($fieldName);
5352
if (empty($this->rules[$fieldName]['helperText'])) {
5453
unset($this->rules[$fieldName]['helperText']);

lib/Service/Certificate/ValidateService.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,27 @@ class ValidateService {
1616
public function __construct(
1717
protected RulesService $rulesService,
1818
protected IL10N $l10n,
19-
)
20-
{
19+
) {
2120

2221
}
2322

2423
public function validate(string $fieldName, string $value):void {
2524
$rule = $this->rulesService->getRule($fieldName);
2625
$value = trim($value);
2726
$length = strlen($value);
28-
if(!$length && isset($rule['required']) && $rule['required']){
27+
if (!$length && isset($rule['required']) && $rule['required']) {
2928
throw new InvalidArgumentException(
3029
$this->l10n->t("Parameter '%s' is required!", [$fieldName])
3130
);
3231
}
33-
if($length > $rule['max'] || $length < $rule['min']){
32+
if ($length > $rule['max'] || $length < $rule['min']) {
3433
throw new InvalidArgumentException(
3534
$this->l10n->t("Parameter '%s' should be betweeen %s and %s.", [$fieldName, $rule['min'], $rule['max']])
3635
);
3736
}
3837
}
3938

40-
public function validateNames(array $names){
39+
public function validateNames(array $names) {
4140
foreach ($names as $item) {
4241
if (empty($item['id'])) {
4342
throw new InvalidArgumentException('Parameter id is required!');

0 commit comments

Comments
 (0)