13 lines
376 B
PHP
13 lines
376 B
PHP
<?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 ) );
|
||
|
|
}
|
||
|
|
}
|