Skip to content

Commit 26f4af4

Browse files
authored
Merge pull request #8 from KaririCode-Framework/develop
refactor: update handleAttribute logic
2 parents 6b9f080 + 52aeb04 commit 26f4af4

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/AttributeHandler.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@ public function handleAttribute(string $propertyName, object $attribute, mixed $
3232
$processors = $attribute->getProcessors();
3333

3434
if ($attribute instanceof CustomizableMessageAttribute) {
35-
foreach ($processors as $processorName => &$processorConfig) {
35+
foreach ($processors as $processorName => &$config) {
3636
$customMessage = $attribute->getMessage($processorName);
3737
if (null !== $customMessage) {
38-
$processorConfig['customMessage'] = $customMessage;
38+
$config['customMessage'] = $customMessage;
3939
}
4040
}
41-
unset($processorConfig); // Break the reference after use
4241
}
4342

4443
$pipeline = $this->builder->buildPipeline($this->processorType, $processors);

0 commit comments

Comments
 (0)