Skip to content

Commit

Permalink
Rename const Settings::EVENT_AFTER_DECODE_VALUE -> EVENT_AFTER_DECODE
Browse files Browse the repository at this point in the history
  • Loading branch information
lav45 committed Nov 23, 2024
1 parent 8ead902 commit cb947c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
*/
class Settings extends Component implements SettingsInterface
{
public const EVENT_BEFORE_GET = 'beforeGetValue';
public const EVENT_AFTER_GET = 'afterGetValue';
public const EVENT_AFTER_DECODE_VALUE = 'afterDecodeValue';
public const EVENT_BEFORE_SET = 'beforeSetValue';
public const EVENT_AFTER_SET = 'afterSetValue';
public const EVENT_BEFORE_DELETE = 'beforeDeleteValue';
public const EVENT_AFTER_DELETE = 'afterDeleteValue';
public const EVENT_BEFORE_GET = 'beforeGet';
public const EVENT_AFTER_GET = 'afterGet';
public const EVENT_AFTER_DECODE = 'afterDecode';
public const EVENT_BEFORE_SET = 'beforeSet';
public const EVENT_AFTER_SET = 'afterSet';
public const EVENT_BEFORE_DELETE = 'beforeDelete';
public const EVENT_AFTER_DELETE = 'afterDelete';

/**
* @var string
Expand Down Expand Up @@ -203,7 +203,7 @@ protected function afterDecodeValue($key, $value, $default)
$event->key = $key;
$event->value = $value;
$event->default = $default;
$this->trigger(self::EVENT_AFTER_DECODE_VALUE, $event);
$this->trigger(self::EVENT_AFTER_DECODE, $event);
return $event->value;
}

Expand Down
2 changes: 1 addition & 1 deletion src/behaviors/QuickAccessBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function attach($owner)
{
parent::attach($owner);
$owner->on(Settings::EVENT_BEFORE_GET, [$this, 'beforeGetValue'], null, false);
$owner->on(Settings::EVENT_AFTER_DECODE_VALUE, [$this, 'afterDecodeValue']);
$owner->on(Settings::EVENT_AFTER_DECODE, [$this, 'afterDecodeValue']);
}

/**
Expand Down

0 comments on commit cb947c6

Please sign in to comment.