Skip to content

Commit f89bd78

Browse files
committed
fix: Validation::loadRuleGroup()
1 parent 27b9d57 commit f89bd78

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

system/BaseModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ abstract class BaseModel
198198
/**
199199
* Our validator instance.
200200
*
201-
* @var Validation
201+
* @var ValidationInterface
202202
*/
203203
protected $validation;
204204

system/Validation/Validation.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,12 +559,14 @@ protected function loadRuleSets()
559559
* same format used with setRules(). Additionally, check
560560
* for {group}_errors for an array of custom error messages.
561561
*
562-
* @return array|ValidationException|null
562+
* @throws ValidationException
563+
*
564+
* @return array
563565
*/
564566
public function loadRuleGroup(?string $group = null)
565567
{
566568
if (empty($group)) {
567-
return null;
569+
return [];
568570
}
569571

570572
if (! isset($this->config->{$group})) {

0 commit comments

Comments
 (0)