1 | <?php |
||
23 | class Manager |
||
24 | { |
||
25 | /** |
||
26 | * @var ProviderInterface[] |
||
27 | */ |
||
28 | protected $providers = array(); |
||
29 | |||
30 | /** |
||
31 | * The callable used to instantiate the event collection. |
||
32 | * |
||
33 | * @var callable |
||
34 | */ |
||
35 | protected $collectionInstantiator; |
||
36 | |||
37 | /** |
||
38 | * @param array $providers |
||
39 | * @param null $instantiator |
||
40 | */ |
||
41 | public function __construct(array $providers = array(), $instantiator = null) |
||
54 | |||
55 | /** |
||
56 | * find events that matches the given period (during or over). |
||
57 | * |
||
58 | * @param \CalendR\Period\PeriodInterface $period |
||
59 | * @param array $options |
||
60 | * |
||
61 | * @return array|EventInterface |
||
62 | * |
||
63 | * @throws NoProviderFound |
||
64 | */ |
||
65 | public function find(PeriodInterface $period, array $options = array()) |
||
94 | |||
95 | /** |
||
96 | * Adds a provider to the provider stack. |
||
97 | * |
||
98 | * @param $name |
||
99 | * @param ProviderInterface $provider |
||
100 | */ |
||
101 | public function addProvider($name, ProviderInterface $provider) |
||
105 | |||
106 | /** |
||
107 | * Sets the callable used to instantiate the event collection. |
||
108 | * |
||
109 | * @param callable $collectionInstantiator |
||
110 | */ |
||
111 | public function setCollectionInstantiator($collectionInstantiator) |
||
115 | |||
116 | /** |
||
117 | * @return \CalendR\Event\Provider\ProviderInterface |
||
118 | */ |
||
119 | public function getProviders() |
||
123 | } |
||
124 |
A high number of execution paths generally suggests many nested conditional statements and make the code less readible. This can usually be fixed by splitting the method into several smaller methods.
You can also find more information in the “Code” section of your repository.