Skip to content

Commit a8b554d

Browse files
Refactor duplicated logic in ReplacesAttributes (#56795)
1 parent 24556c0 commit a8b554d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Illuminate/Validation/Concerns/ReplacesAttributes.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,10 +398,7 @@ protected function replacePresentIf($message, $attribute, $rule, $parameters)
398398
*/
399399
protected function replacePresentUnless($message, $attribute, $rule, $parameters)
400400
{
401-
return str_replace([':other', ':value'], [
402-
$this->getDisplayableAttribute($parameters[0]),
403-
$this->getDisplayableValue($parameters[0], $parameters[1]),
404-
], $message);
401+
return $this->replaceMissingUnless($message, $attribute, $rule, $parameters);
405402
}
406403

407404
/**

0 commit comments

Comments
 (0)