| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 63 | 
| Code Lines | 40 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 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 | ||
| 20 | public function update_data() | ||
| 21 | 	{ | ||
| 22 | return [ | ||
| 23 | // Config Add | ||
| 24 | ['config.add', ['dark1_mas_avatar', 0]], | ||
| 25 | ['config.add', ['dark1_mas_online', 0]], | ||
| 26 | ['config.add', ['dark1_mas_col_off', '000000']], | ||
| 27 | ['config.add', ['dark1_mas_col_on', '00FF00']], | ||
| 28 | |||
| 29 | // Module Remove | ||
| 30 | ['module.remove', ['acp', 'ACP_MAS_TITLE', 'ACP_MAS_MODE_REVIEW']], | ||
| 31 | ['module.remove', ['acp', 'ACP_MAS_TITLE', 'ACP_MAS_MODE_SEARCH']], | ||
| 32 | ['module.remove', ['acp', 'ACP_MAS_TITLE', 'ACP_MAS_MODE_VIEWFORUM']], | ||
| 33 | ['module.remove', ['acp', 'ACP_MAS_TITLE', 'ACP_MAS_MODE_VIEWONLINE']], | ||
| 34 | ['module.remove', ['acp', 'ACP_MAS_TITLE', 'ACP_MAS_MODE_MEMBERLIST']], | ||
| 35 | |||
| 36 | // Module Add | ||
| 37 | ['module.add', [ | ||
| 38 | 'acp', | ||
| 39 | 'ACP_MAS_TITLE', | ||
| 40 | [ | ||
| 41 | 'module_basename' => '\dark1\memberavatarstatus\acp\general_module', | ||
| 42 | 'modes' => ['general'], | ||
| 43 | ], | ||
| 44 | ]], | ||
| 45 | ['module.add', [ | ||
| 46 | 'acp', | ||
| 47 | 'ACP_MAS_TITLE', | ||
| 48 | [ | ||
| 49 | 'module_basename' => '\dark1\memberavatarstatus\acp\memberlist_module', | ||
| 50 | 'modes' => ['memberlist'], | ||
| 51 | ], | ||
| 52 | ]], | ||
| 53 | ['module.add', [ | ||
| 54 | 'acp', | ||
| 55 | 'ACP_MAS_TITLE', | ||
| 56 | [ | ||
| 57 | 'module_basename' => '\dark1\memberavatarstatus\acp\viewonline_module', | ||
| 58 | 'modes' => ['viewonline'], | ||
| 59 | ], | ||
| 60 | ]], | ||
| 61 | ['module.add', [ | ||
| 62 | 'acp', | ||
| 63 | 'ACP_MAS_TITLE', | ||
| 64 | [ | ||
| 65 | 'module_basename' => '\dark1\memberavatarstatus\acp\viewforum_module', | ||
| 66 | 'modes' => ['viewforum'], | ||
| 67 | ], | ||
| 68 | ]], | ||
| 69 | ['module.add', [ | ||
| 70 | 'acp', | ||
| 71 | 'ACP_MAS_TITLE', | ||
| 72 | [ | ||
| 73 | 'module_basename' => '\dark1\memberavatarstatus\acp\search_module', | ||
| 74 | 'modes' => ['search'], | ||
| 75 | ], | ||
| 76 | ]], | ||
| 77 | ['module.add', [ | ||
| 78 | 'acp', | ||
| 79 | 'ACP_MAS_TITLE', | ||
| 80 | [ | ||
| 81 | 'module_basename' => '\dark1\memberavatarstatus\acp\review_module', | ||
| 82 | 'modes' => ['review'], | ||
| 83 | ], | ||
| 88 |