| Conditions | 1 |
| Paths | 1 |
| Total Lines | 66 |
| Code Lines | 51 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 7 | ||
| Bugs | 1 | Features | 6 |
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 |
||
| 93 | public function getHooks() |
||
| 94 | { |
||
| 95 | return [ |
||
| 96 | array( |
||
| 97 | "type" => TemplateDefinition::BACK_OFFICE, |
||
| 98 | "code" => "dealer.extra.content.edit", |
||
| 99 | "title" => "Dealer Extra Content", |
||
| 100 | "description" => [ |
||
| 101 | "en_US" => "Allow you to insert element in modules tab on Dealer edit page", |
||
| 102 | "fr_FR" => "Permet l'ajout de contenu sur la partie module de l'edition", |
||
| 103 | ], |
||
| 104 | "active" => true, |
||
| 105 | ), |
||
| 106 | array( |
||
| 107 | "type" => TemplateDefinition::BACK_OFFICE, |
||
| 108 | "code" => "dealer.edit.js", |
||
| 109 | "title" => "Dealer Edit Extra Js", |
||
| 110 | "description" => [ |
||
| 111 | "en_US" => "Allow you to insert js on Dealer edit page", |
||
| 112 | "fr_FR" => "Permet l'ajout de js sur l'edition", |
||
| 113 | ], |
||
| 114 | "active" => true, |
||
| 115 | ), |
||
| 116 | array( |
||
| 117 | "type" => TemplateDefinition::BACK_OFFICE, |
||
| 118 | "code" => "dealer.js", |
||
| 119 | "title" => "Dealer Extra Js", |
||
| 120 | "description" => [ |
||
| 121 | "en_US" => "Allow you to insert js on Dealer list", |
||
| 122 | "fr_FR" => "Permet l'ajout de js sur la liste", |
||
| 123 | ], |
||
| 124 | "active" => true, |
||
| 125 | ), |
||
| 126 | array( |
||
| 127 | "type" => TemplateDefinition::BACK_OFFICE, |
||
| 128 | "code" => "dealer.additional", |
||
| 129 | "title" => "Dealer Extra Tab", |
||
| 130 | "description" => [ |
||
| 131 | "en_US" => "Allow you to insert a tab on Dealer edit page", |
||
| 132 | "fr_FR" => "Permet l'ajout d'une page sur l'edition d'un point de vente", |
||
| 133 | ], |
||
| 134 | "active" => true, |
||
| 135 | "block" => true, |
||
| 136 | ), |
||
| 137 | array( |
||
| 138 | "type" => TemplateDefinition::BACK_OFFICE, |
||
| 139 | "code" => "dealer.edit.nav.bar", |
||
| 140 | "title" => "Dealer Edition NavBar Link", |
||
| 141 | "description" => [ |
||
| 142 | "en_US" => "Allow you to insert link between arrow previous and next on edtion view", |
||
| 143 | "fr_FR" => "Permet l'ajout d'un lien sur la page d'édition entre les liens suivant et précedent", |
||
| 144 | ], |
||
| 145 | "active" => true, |
||
| 146 | ), |
||
| 147 | array( |
||
| 148 | "type" => TemplateDefinition::BACK_OFFICE, |
||
| 149 | "code" => "dealer.associated.tabcontent", |
||
| 150 | "title" => "Dealer Associated Nav Tab", |
||
| 151 | "description" => [ |
||
| 152 | "en_US" => "Allow you to insert association content", |
||
| 153 | "fr_FR" => "Permet l'ajout de contenu dans la table d'association", |
||
| 154 | ], |
||
| 155 | "active" => true, |
||
| 156 | ), |
||
| 157 | ]; |
||
| 158 | } |
||
| 159 | |||
| 170 |