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