Conditions | 1 |
Paths | 1 |
Total Lines | 83 |
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 |
||
75 | public function getHooks() |
||
76 | { |
||
77 | return array( |
||
78 | array( |
||
79 | "type" => TemplateDefinition::BACK_OFFICE, |
||
80 | "code" => "feature-type.form-top", |
||
81 | "title" => array( |
||
82 | "fr_FR" => "Module Feature Type, form haut", |
||
83 | "en_US" => "Module Feature Type, form top", |
||
84 | ), |
||
85 | "description" => array( |
||
86 | "fr_FR" => "En haut du formulaire de création et de mise à jour", |
||
87 | "en_US" => "Top of creation form and update", |
||
88 | ), |
||
89 | "active" => true |
||
90 | ), |
||
91 | array( |
||
92 | "type" => TemplateDefinition::BACK_OFFICE, |
||
93 | "code" => "feature-type.form-bottom", |
||
94 | "title" => array( |
||
95 | "fr_FR" => "Module Feature Type, form bas", |
||
96 | "en_US" => "Module Feature Type, form bottom", |
||
97 | ), |
||
98 | "description" => array( |
||
99 | "fr_FR" => "En bas du formulaire de création et de mise à jour", |
||
100 | "en_US" => "Top of creation form and update", |
||
101 | ), |
||
102 | "active" => true |
||
103 | ), |
||
104 | array( |
||
105 | "type" => TemplateDefinition::BACK_OFFICE, |
||
106 | "code" => "feature-type.configuration-top", |
||
107 | "title" => array( |
||
108 | "fr_FR" => "Module Feature Type, configuration haut", |
||
109 | "en_US" => "Module Feature Type, configuration top", |
||
110 | ), |
||
111 | "description" => array( |
||
112 | "fr_FR" => "En haut du la page de configuration du module", |
||
113 | "en_US" => "At the top of the module's configuration page", |
||
114 | ), |
||
115 | "active" => true |
||
116 | ), |
||
117 | array( |
||
118 | "type" => TemplateDefinition::BACK_OFFICE, |
||
119 | "code" => "feature-type.configuration-bottom", |
||
120 | "title" => array( |
||
121 | "fr_FR" => "Module Feature Type, configuration bas", |
||
122 | "en_US" => "Module Feature Type, configuration bottom", |
||
123 | ), |
||
124 | "description" => array( |
||
125 | "fr_FR" => "En bas du la page de configuration du module", |
||
126 | "en_US" => "At the bottom of the module's configuration page", |
||
127 | ), |
||
128 | "active" => true |
||
129 | ), |
||
130 | array( |
||
131 | "type" => TemplateDefinition::BACK_OFFICE, |
||
132 | "code" => "feature-type.list-action", |
||
133 | "title" => array( |
||
134 | "fr_FR" => "Module Feature Type, list action", |
||
135 | "en_US" => "Module Feature Type, list action", |
||
136 | ), |
||
137 | "description" => array( |
||
138 | "fr_FR" => "Action de la liste des types de caractéristiques", |
||
139 | "en_US" => "Action from the list of features types", |
||
140 | ), |
||
141 | "active" => true |
||
142 | ), |
||
143 | array( |
||
144 | "type" => TemplateDefinition::BACK_OFFICE, |
||
145 | "code" => "feature-type.configuration-js", |
||
146 | "title" => array( |
||
147 | "fr_FR" => "Module Feature Type, configuration js", |
||
148 | "en_US" => "Module Feature Type, configuration js", |
||
149 | ), |
||
150 | "description" => array( |
||
151 | "fr_FR" => "JS la page de configuration du module", |
||
152 | "en_US" => "JS of the module's configuration page", |
||
153 | ), |
||
154 | "active" => true |
||
155 | ) |
||
156 | ); |
||
157 | } |
||
158 | } |
||
159 |