Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SOHELAHMED7 committed Feb 20, 2025
1 parent 27145e8 commit b87be74
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/lib/ValidationRulesBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ private function resolveAttributeRules(Attribute $attribute):void
}
if ($attribute->phpType === 'bool' || $attribute->phpType === 'boolean') {
$this->rules[$attribute->columnName . '_boolean'] = new ValidationRule([$attribute->columnName], 'boolean');
// $this->defaultRule($attribute);
return;
}

Expand All @@ -119,13 +118,11 @@ private function resolveAttributeRules(Attribute $attribute):void
}

$this->rules[$key] = new ValidationRule([$attribute->columnName], $attribute->dbType, $params);
// $this->defaultRule($attribute);
return;
}

if (in_array($attribute->phpType, ['int', 'integer', 'double', 'float']) && !$attribute->isReference()) {
$this->addNumericRule($attribute);
// $this->defaultRule($attribute);
return;
}
if ($attribute->phpType === 'string' && !$attribute->isReference()) {
Expand All @@ -135,10 +132,8 @@ private function resolveAttributeRules(Attribute $attribute):void
$key = $attribute->columnName . '_in';
$this->rules[$key] =
new ValidationRule([$attribute->columnName], 'in', ['range' => $attribute->enumValues]);
// $this->defaultRule($attribute); // TODO remove
return;
}
// $this->defaultRule($attribute);
$this->addRulesByAttributeName($attribute);
}

Expand Down

0 comments on commit b87be74

Please sign in to comment.