| Conditions | 1 |
| Paths | 1 |
| Total Lines | 51 |
| 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 |
||
| 34 | protected function registerDependencies() |
||
| 35 | { |
||
| 36 | $this->dependency_map->registerDependencies( |
||
| 37 | 'EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy', |
||
| 38 | [ |
||
| 39 | 'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache, |
||
| 40 | 'EventEspresso\core\domain\values\session\SessionLifespan' => EE_Dependency_Map::load_from_cache |
||
| 41 | ] |
||
| 42 | ); |
||
| 43 | $this->dependency_map->registerDependencies( |
||
| 44 | 'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendee', |
||
| 45 | ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
||
| 46 | ); |
||
| 47 | $this->dependency_map->registerDependencies( |
||
| 48 | 'EventEspresso\core\domain\services\admin\privacy\export\ExportAttendeeBillingData', |
||
| 49 | [ |
||
| 50 | 'EEM_Attendee' => EE_Dependency_Map::load_from_cache, |
||
| 51 | 'EEM_Payment_Method' => EE_Dependency_Map::load_from_cache |
||
| 52 | ] |
||
| 53 | ); |
||
| 54 | $this->dependency_map->registerDependencies( |
||
| 55 | 'EventEspresso\core\domain\services\admin\privacy\export\ExportCheckins', |
||
| 56 | ['EEM_Checkin' => EE_Dependency_Map::load_from_cache] |
||
| 57 | ); |
||
| 58 | $this->dependency_map->registerDependencies( |
||
| 59 | 'EventEspresso\core\domain\services\admin\privacy\export\ExportRegistration', |
||
| 60 | ['EEM_Registration' => EE_Dependency_Map::load_from_cache] |
||
| 61 | ); |
||
| 62 | $this->dependency_map->registerDependencies( |
||
| 63 | 'EventEspresso\core\domain\services\admin\privacy\export\ExportTransaction', |
||
| 64 | ['EEM_Transaction' => EE_Dependency_Map::load_from_cache] |
||
| 65 | ); |
||
| 66 | $this->dependency_map->registerDependencies( |
||
| 67 | 'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAttendeeData', |
||
| 68 | ['EEM_Attendee' => EE_Dependency_Map::load_from_cache] |
||
| 69 | ); |
||
| 70 | $this->dependency_map->registerDependencies( |
||
| 71 | 'EventEspresso\core\domain\services\admin\privacy\erasure\EraseAnswers', |
||
| 72 | [ |
||
| 73 | 'EEM_Answer' => EE_Dependency_Map::load_from_cache, |
||
| 74 | 'EEM_Question' => EE_Dependency_Map::load_from_cache, |
||
| 75 | ] |
||
| 76 | ); |
||
| 77 | $this->dependency_map->registerDependencies( |
||
| 78 | 'EventEspresso\core\domain\services\admin\privacy\forms\PrivacySettingsFormHandler', |
||
| 79 | [ |
||
| 80 | 'EE_Registry' => EE_Dependency_Map::load_from_cache, |
||
| 81 | 'EE_Config' => EE_Dependency_Map::load_from_cache |
||
| 82 | ] |
||
| 83 | ); |
||
| 84 | } |
||
| 85 | |||
| 100 |