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