| Conditions | 1 |
| Paths | 1 |
| Total Lines | 65 |
| Code Lines | 51 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 6 | ||
| Bugs | 1 | Features | 5 |
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 | return [ |
||
| 74 | array( |
||
| 75 | "type" => TemplateDefinition::BACK_OFFICE, |
||
| 76 | "code" => "dealer.extra.content.edit", |
||
| 77 | "title" => "Dealer Extra Content", |
||
| 78 | "description" => [ |
||
| 79 | "en_US" =>"Allow you to insert element in modules tab on Dealer edit page", |
||
| 80 | "fr_FR" =>"Permet l'ajout de contenu sur la partie module de l'edition", |
||
| 81 | ], |
||
| 82 | "active" => true, |
||
| 83 | ), |
||
| 84 | array( |
||
| 85 | "type" => TemplateDefinition::BACK_OFFICE, |
||
| 86 | "code" => "dealer.edit.js", |
||
| 87 | "title" => "Dealer Edit Extra Js", |
||
| 88 | "description" => [ |
||
| 89 | "en_US" =>"Allow you to insert js on Dealer edit page", |
||
| 90 | "fr_FR" =>"Permet l'ajout de js sur l'edition", |
||
| 91 | ], |
||
| 92 | "active" => true, |
||
| 93 | ), |
||
| 94 | array( |
||
| 95 | "type" => TemplateDefinition::BACK_OFFICE, |
||
| 96 | "code" => "dealer.js", |
||
| 97 | "title" => "Dealer Extra Js", |
||
| 98 | "description" => [ |
||
| 99 | "en_US" =>"Allow you to insert js on Dealer list", |
||
| 100 | "fr_FR" =>"Permet l'ajout de js sur la liste", |
||
| 101 | ], |
||
| 102 | "active" => true, |
||
| 103 | ), |
||
| 104 | array( |
||
| 105 | "type" => TemplateDefinition::BACK_OFFICE, |
||
| 106 | "code" => "dealer.additional", |
||
| 107 | "title" => "Dealer Extra Tab", |
||
| 108 | "description" => [ |
||
| 109 | "en_US" =>"Allow you to insert a tab on Dealer edit page", |
||
| 110 | "fr_FR" =>"Permet l'ajout d'une page sur l'edition d'un point de vente", |
||
| 111 | ], |
||
| 112 | "active" => true, |
||
| 113 | "block" => true, |
||
| 114 | ), |
||
| 115 | array( |
||
| 116 | "type" => TemplateDefinition::BACK_OFFICE, |
||
| 117 | "code" => "dealer.edit.nav.bar", |
||
| 118 | "title" => "Dealer Edition NavBar Link", |
||
| 119 | "description" => [ |
||
| 120 | "en_US" =>"Allow you to insert link between arrow previous and next on edtion view", |
||
| 121 | "fr_FR" =>"Permet l'ajout d'un lien sur la page d'édition entre les liens suivant et précedent", |
||
| 122 | ], |
||
| 123 | "active" => true, |
||
| 124 | ), |
||
| 125 | array( |
||
| 126 | "type" => TemplateDefinition::BACK_OFFICE, |
||
| 127 | "code" => "dealer.associated.tabcontent", |
||
| 128 | "title" => "Dealer Associated Nav Tab", |
||
| 129 | "description" => [ |
||
| 130 | "en_US" =>"Allow you to insert association content", |
||
| 131 | "fr_FR" =>"Permet l'ajout de contenu dans la table d'association", |
||
| 132 | ], |
||
| 133 | "active" => true, |
||
| 134 | ), |
||
| 135 | ]; |
||
| 136 | } |
||
| 137 | } |
||
| 138 |