Files

13 lines
376 B
PHP
Raw Permalink Normal View History

<?php
declare( strict_types=1 );
namespace StreamGoals\Tests\Unit;
use StreamGoals\Rules\RuleStore;
final class FakeRuleStore implements RuleStore {
public function __construct( public array $rules = array() ) {}
public function enabledForGoal( int $goalId ): array {
return array_values( array_filter( $this->rules, static fn( $r ) => $r->goalId === $goalId ) );
}
}