| Conditions | 1 |
| Paths | 1 |
| Total Lines | 119 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 85 | protected function registerDependencies() |
||
| 86 | { |
||
| 87 | $this->dependency_map->registerDependencies( |
||
| 88 | 'EventEspresso\core\services\graphql\GraphQLManager', |
||
| 89 | [ |
||
| 90 | 'EventEspresso\core\services\graphql\ConnectionsManager' => EE_Dependency_Map::load_from_cache, |
||
| 91 | 'EventEspresso\core\services\graphql\DataLoaderManager' => EE_Dependency_Map::load_from_cache, |
||
| 92 | 'EventEspresso\core\services\graphql\EnumsManager' => EE_Dependency_Map::load_from_cache, |
||
| 93 | 'EventEspresso\core\services\graphql\InputsManager' => EE_Dependency_Map::load_from_cache, |
||
| 94 | 'EventEspresso\core\services\graphql\TypesManager' => EE_Dependency_Map::load_from_cache, |
||
| 95 | ] |
||
| 96 | ); |
||
| 97 | $this->dependency_map->registerDependencies( |
||
| 98 | 'EventEspresso\core\services\graphql\TypesManager', |
||
| 99 | [ |
||
| 100 | 'EventEspresso\core\services\graphql\types\TypeCollection' => EE_Dependency_Map::load_from_cache, |
||
| 101 | ] |
||
| 102 | ); |
||
| 103 | $this->dependency_map->registerDependencies( |
||
| 104 | 'EventEspresso\core\services\graphql\InputsManager', |
||
| 105 | [ |
||
| 106 | 'EventEspresso\core\services\graphql\inputs\InputCollection' => EE_Dependency_Map::load_from_cache, |
||
| 107 | ] |
||
| 108 | ); |
||
| 109 | $this->dependency_map->registerDependencies( |
||
| 110 | 'EventEspresso\core\services\graphql\EnumsManager', |
||
| 111 | [ |
||
| 112 | 'EventEspresso\core\services\graphql\enums\EnumCollection' => EE_Dependency_Map::load_from_cache, |
||
| 113 | ] |
||
| 114 | ); |
||
| 115 | $this->dependency_map->registerDependencies( |
||
| 116 | 'EventEspresso\core\services\graphql\ConnectionsManager', |
||
| 117 | [ |
||
| 118 | 'EventEspresso\core\services\graphql\connections\ConnectionCollection' => EE_Dependency_Map::load_from_cache, |
||
| 119 | ] |
||
| 120 | ); |
||
| 121 | $this->dependency_map->registerDependencies( |
||
| 122 | 'EventEspresso\core\services\graphql\DataLoaderManager', |
||
| 123 | [ |
||
| 124 | 'EventEspresso\core\services\graphql\loaders\DataLoaderCollection' => EE_Dependency_Map::load_from_cache, |
||
| 125 | ] |
||
| 126 | ); |
||
| 127 | $this->dependency_map->registerDependencies( |
||
| 128 | 'EventEspresso\core\domain\services\graphql\types\Datetime', |
||
| 129 | ['EEM_Datetime' => EE_Dependency_Map::load_from_cache] |
||
| 130 | ); |
||
| 131 | $this->dependency_map->registerDependencies( |
||
| 132 | 'EventEspresso\core\domain\services\graphql\types\Attendee', |
||
| 133 | ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
||
| 134 | ); |
||
| 135 | $this->dependency_map->registerDependencies( |
||
| 136 | 'EventEspresso\core\domain\services\graphql\types\Event', |
||
| 137 | ['EEM_Event' => EE_Dependency_Map::load_from_cache] |
||
| 138 | ); |
||
| 139 | $this->dependency_map->registerDependencies( |
||
| 140 | 'EventEspresso\core\domain\services\graphql\types\Ticket', |
||
| 141 | ['EEM_Ticket' => EE_Dependency_Map::load_from_cache] |
||
| 142 | ); |
||
| 143 | $this->dependency_map->registerDependencies( |
||
| 144 | 'EventEspresso\core\domain\services\graphql\types\Price', |
||
| 145 | ['EEM_Price' => EE_Dependency_Map::load_from_cache] |
||
| 146 | ); |
||
| 147 | $this->dependency_map->registerDependencies( |
||
| 148 | 'EventEspresso\core\domain\services\graphql\types\PriceType', |
||
| 149 | ['EEM_Price_Type' => EE_Dependency_Map::load_from_cache] |
||
| 150 | ); |
||
| 151 | $this->dependency_map->registerDependencies( |
||
| 152 | 'EventEspresso\core\domain\services\graphql\types\Venue', |
||
| 153 | ['EEM_Venue' => EE_Dependency_Map::load_from_cache] |
||
| 154 | ); |
||
| 155 | $this->dependency_map->registerDependencies( |
||
| 156 | 'EventEspresso\core\domain\services\graphql\types\State', |
||
| 157 | ['EEM_State' => EE_Dependency_Map::load_from_cache] |
||
| 158 | ); |
||
| 159 | $this->dependency_map->registerDependencies( |
||
| 160 | 'EventEspresso\core\domain\services\graphql\types\Country', |
||
| 161 | ['EEM_Country' => EE_Dependency_Map::load_from_cache] |
||
| 162 | ); |
||
| 163 | $this->dependency_map->registerDependencies( |
||
| 164 | 'EventEspresso\core\domain\services\graphql\connections\EventDatetimesConnection', |
||
| 165 | ['EEM_Datetime' => EE_Dependency_Map::load_from_cache] |
||
| 166 | ); |
||
| 167 | $this->dependency_map->registerDependencies( |
||
| 168 | 'EventEspresso\core\domain\services\graphql\connections\RootQueryDatetimesConnection', |
||
| 169 | ['EEM_Datetime' => EE_Dependency_Map::load_from_cache] |
||
| 170 | ); |
||
| 171 | $this->dependency_map->registerDependencies( |
||
| 172 | 'EventEspresso\core\domain\services\graphql\connections\RootQueryAttendeesConnection', |
||
| 173 | ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
||
| 174 | ); |
||
| 175 | $this->dependency_map->registerDependencies( |
||
| 176 | 'EventEspresso\core\domain\services\graphql\connections\DatetimeTicketsConnection', |
||
| 177 | ['EEM_Ticket' => EE_Dependency_Map::load_from_cache] |
||
| 178 | ); |
||
| 179 | $this->dependency_map->registerDependencies( |
||
| 180 | 'EventEspresso\core\domain\services\graphql\connections\RootQueryTicketsConnection', |
||
| 181 | ['EEM_Ticket' => EE_Dependency_Map::load_from_cache] |
||
| 182 | ); |
||
| 183 | $this->dependency_map->registerDependencies( |
||
| 184 | 'EventEspresso\core\domain\services\graphql\connections\TicketPricesConnection', |
||
| 185 | ['EEM_Price' => EE_Dependency_Map::load_from_cache] |
||
| 186 | ); |
||
| 187 | $this->dependency_map->registerDependencies( |
||
| 188 | 'EventEspresso\core\domain\services\graphql\connections\RootQueryPricesConnection', |
||
| 189 | ['EEM_Price' => EE_Dependency_Map::load_from_cache] |
||
| 190 | ); |
||
| 191 | $this->dependency_map->registerDependencies( |
||
| 192 | 'EventEspresso\core\domain\services\graphql\connections\RootQueryPriceTypesConnection', |
||
| 193 | ['EEM_Price_Type' => EE_Dependency_Map::load_from_cache] |
||
| 194 | ); |
||
| 195 | $this->dependency_map->registerDependencies( |
||
| 196 | 'EventEspresso\core\domain\services\graphql\connections\TicketDatetimesConnection', |
||
| 197 | ['EEM_Datetime' => EE_Dependency_Map::load_from_cache] |
||
| 198 | ); |
||
| 199 | $this->dependency_map->registerDependencies( |
||
| 200 | 'EventEspresso\core\domain\services\graphql\connections\EventVenuesConnection', |
||
| 201 | ['EEM_Venue' => EE_Dependency_Map::load_from_cache] |
||
| 202 | ); |
||
| 203 | } |
||
| 204 | |||
| 227 |