@@ -233,11 +233,11 @@ discard block |
||
233 | 233 | */ |
234 | 234 | public function default() |
235 | 235 | { |
236 | - if (!isset($this->constraints[Rule::DEFAULT])) { |
|
236 | + if (!isset($this->constraints[Rule::default])) { |
|
237 | 237 | return null; |
238 | 238 | } |
239 | 239 | |
240 | - return $this->constraints[Rule::DEFAULT]; |
|
240 | + return $this->constraints[Rule::default]; |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | public function usedIn(string $action): bool |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | unset($constraints[$name]); |
403 | 403 | } elseif ($name === Rule::FOREIGNKEY && \is_string($value)) { |
404 | 404 | $constraints[$name] = $this->getFkOptions($value); |
405 | - } elseif ($name === Rule::DEFAULT && !\is_bool($value) && \preg_match('#^\d.\d#', $value)) { |
|
405 | + } elseif ($name === Rule::default && !\is_bool($value) && \preg_match('#^\d.\d#', $value)) { |
|
406 | 406 | $constraints[$name] = (float)$value; |
407 | 407 | } else { |
408 | 408 | $constraints[$name] = \is_numeric($value) ? (int)$value : $value; |
@@ -63,7 +63,7 @@ |
||
63 | 63 | |
64 | 64 | public const HIDE = 'hide'; |
65 | 65 | |
66 | - public const DEFAULT = 'default'; |
|
66 | + public const default = 'default'; |
|
67 | 67 | |
68 | 68 | public const PATTERN = 'pattern'; |
69 | 69 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | Rule::LINK, |
57 | 57 | Rule::SHOW, |
58 | 58 | Rule::HIDE, |
59 | - Rule::DEFAULT, |
|
59 | + Rule::default, |
|
60 | 60 | ]; |
61 | 61 | |
62 | 62 | private array $validators = [ |