Skip to content

Commit

Permalink
Add missing filter -> validator terminology changes
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanCraft623 committed Dec 12, 2024
1 parent 6d854d3 commit a413c3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/entity/effect/EffectContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class EffectContainer{
*
* @phpstan-var \Closure(EffectInstance) : bool
*/
protected \Closure $effectValidatorForBubbles;
protected \Closure $effectFilterForBubbles;

public function __construct(){
$this->bubbleColor = new Color(0, 0, 0, 0);
Expand Down Expand Up @@ -170,7 +170,7 @@ public function add(EffectInstance $effect) : bool{
*/
public function setEffectFilterForBubbles(\Closure $effectValidator) : void{
Utils::validateCallableSignature(new CallbackType(new ReturnType(BuiltInTypes::BOOL), new ParameterType("effect", EffectInstance::class)), $effectValidator);
$this->effectValidatorForBubbles = $effectValidator;
$this->effectFilterForBubbles = $effectValidator;
}

/**
Expand All @@ -181,7 +181,7 @@ protected function recalculateEffectColor() : void{
$colors = [];
$ambient = true;
foreach($this->effects as $effect){
if(($this->effectValidatorForBubbles)($effect)){
if(($this->effectFilterForBubbles)($effect)){
$level = $effect->getEffectLevel();
$color = $effect->getColor();
for($i = 0; $i < $level; ++$i){
Expand Down

0 comments on commit a413c3b

Please sign in to comment.