88use Shergela \Validations \Enums \ValidationRegexEnum as RegexRule ;
99use Shergela \Validations \Enums \ValidationRuleEnum as Rule ;
1010use Shergela \Validations \Enums \ValidationStringEnum as StringRule ;
11- use Shergela \Validations \Rules \LowercaseFirstLetter ;
12- use Shergela \Validations \Rules \SeparateIntegersByComma ;
13- use Shergela \Validations \Rules \SeparateStringsByComma ;
14- use Shergela \Validations \Rules \SeparateStringsByUnderscore ;
15- use Shergela \Validations \Rules \TimezoneValidation ;
16- use Shergela \Validations \Rules \TimezoneRegionValidation ;
17- use Shergela \Validations \Rules \UppercaseFirstLetter ;
11+ use Shergela \Validations \Rules \LowercaseFirstLetter as LowerFL ;
12+ use Shergela \Validations \Rules \SeparateIntegersByComma as IntegerByComma ;
13+ use Shergela \Validations \Rules \SeparateStringsByComma as StringByComma ;
14+ use Shergela \Validations \Rules \SeparateStringsByUnderscore as StringByUnderscore ;
15+ use Shergela \Validations \Rules \TimezoneRegionValidation as TimezoneRegion ;
16+ use Shergela \Validations \Rules \TimezoneValidation as Timezone ;
17+ use Shergela \Validations \Rules \UppercaseFirstLetter as UpperFL ;
1818
1919class BuildValidationRule
2020{
@@ -312,7 +312,7 @@ class BuildValidationRule
312312 protected static ?string $ notIn = null ;
313313
314314 /**
315- * @return array<UppercaseFirstLetter|SeparateIntegersByComma|SeparateStringsByComma|SeparateStringsByUnderscore |string>
315+ * @return array<int,LowerFL|IntegerByComma|StringByComma|StringByUnderscore|TimezoneRegion|Timezone|UpperFL |string>
316316 */
317317 protected function buildValidationRules (): array
318318 {
@@ -374,8 +374,8 @@ protected function buildValidationRules(): array
374374 ...($ this ->endsWith !== null ? [$ this ->endsWith ] : []),
375375 ...($ this ->doesntStartWith !== null ? [$ this ->doesntStartWith ] : []),
376376 ...($ this ->doesntEndWith !== null ? [$ this ->doesntEndWith ] : []),
377- ...($ this ->uppercaseFirstLetter === true ? [new UppercaseFirstLetter ()] : []),
378- ...($ this ->lowercaseFirstLetter === true ? [new LowercaseFirstLetter ()] : []),
377+ ...($ this ->uppercaseFirstLetter === true ? [new UpperFL ()] : []),
378+ ...($ this ->lowercaseFirstLetter === true ? [new LowerFL ()] : []),
379379
380380 /**
381381 * --------------------------------------------------------------------------------
@@ -387,12 +387,12 @@ protected function buildValidationRules(): array
387387 ...($ this ->dateBefore !== null ? [DateRule::DATE_BEFORE . $ this ->dateBefore ] : []),
388388 ...($ this ->dateFormat !== null ? [DateRule::DATE_FORMAT . $ this ->dateFormat ] : []),
389389 ...($ this ->timezone !== null ? [DateRule::TIMEZONE_ALL ] : []),
390- ...($ this ->timezones !== null ? [new TimezoneValidation (timezones: $ this ->timezones )] : []),
390+ ...($ this ->timezones !== null ? [new Timezone (timezones: $ this ->timezones )] : []),
391391
392392 ...(
393393 !empty ($ this ->timezoneIdentifierCities )
394394 ? [
395- new TimezoneRegionValidation (
395+ new TimezoneRegion (
396396 cities: $ this ->timezoneIdentifierCities ,
397397 timezoneGroupNumber: $ this ->dateTimezoneGroupNumber ,
398398 timezoneGroup: $ this ->dateTimezoneGroupName
@@ -416,9 +416,9 @@ protected function buildValidationRules(): array
416416 * Regex validations
417417 */
418418 ...($ this ->regexPattern !== null ? [RegexRule::RULE . $ this ->regexPattern ] : []),
419- ...($ this ->separateIntegersByComma === true ? [new SeparateIntegersByComma ()] : []),
420- ...($ this ->separateStringsByComma === true ? [new SeparateStringsByComma ()] : []),
421- ...($ this ->separateStringsByUnderscore === true ? [new SeparateStringsByUnderscore ()] : []),
419+ ...($ this ->separateIntegersByComma === true ? [new IntegerByComma ()] : []),
420+ ...($ this ->separateStringsByComma === true ? [new StringByComma ()] : []),
421+ ...($ this ->separateStringsByUnderscore === true ? [new StringByUnderscore ()] : []),
422422 ];
423423 }
424424}
0 commit comments