Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
9 | class RepositoryManager |
||
10 | { |
||
11 | /** |
||
12 | * The repository instance. |
||
13 | * |
||
14 | * @var RuleRepository |
||
15 | */ |
||
16 | protected $repository; |
||
17 | |||
18 | /** |
||
19 | * Set the repository instance. |
||
20 | * |
||
21 | * @param RuleRepository $repository |
||
22 | */ |
||
23 | 12 | public function __construct(RuleRepository $repository) |
|
26 | 12 | } |
|
27 | |||
28 | /** |
||
29 | * Return the rules for the given state. Get the default state if not specified. |
||
30 | * |
||
31 | * @param string $state |
||
32 | * @return array |
||
33 | * @throws NonExistentStateException |
||
34 | */ |
||
35 | 15 | public function getRules($state = null) |
|
49 |