Skip to content

Commit 198375f

Browse files
committed
Add missing isTextDirection method to Validator interface
1 parent fe1c1f5 commit 198375f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Validation/TypeValidator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ public function isTextTransform(string $transform): bool
168168
return isset($this->allowedTextTransform[$transform]);
169169
}
170170

171+
public function isTextDirection(string $direction): bool
172+
{
173+
return in_array($direction, ['ltr', 'rtl'], true);
174+
}
175+
171176
public function getValidator(string $validatorType)
172177
{
173178
$validatorClassName = __NAMESPACE__ . '\\Validators\\' . ucwords($validatorType) . 'Validator';

src/Validation/Validator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ public function isString(string $string): bool;
2222
public function isFontStyle(string $value): bool;
2323
public function isTextDecoration(string $decoration): bool;
2424
public function isTextTransform(string $transform): bool;
25+
public function isTextDirection(string $direction): bool;
2526
}

0 commit comments

Comments
 (0)