| Conditions | 1 |
| Paths | 1 |
| Total Lines | 26 |
| Code Lines | 13 |
| Lines | 26 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function html_input( $text ) { |
||
| 24 | @ob_start(); |
||
| 25 | ?> |
||
| 26 | <div class="wl-input-wrapper"> |
||
| 27 | <input |
||
| 28 | type="number" |
||
| 29 | id="<?php echo esc_attr( $this->meta_name ); ?>" |
||
| 30 | class="<?php echo esc_attr( $this->meta_name ); ?>" |
||
| 31 | value="<?php echo esc_attr( $text ) ?>" |
||
| 32 | name="wl_metaboxes[<?php echo $this->meta_name; ?>][]" |
||
| 33 | style="width:88%" |
||
| 34 | min="0" |
||
| 35 | /> |
||
| 36 | |||
| 37 | <button class="button wl-remove-input wl-button" type="button"> |
||
| 38 | <?php esc_html_e( 'Remove', 'wordlift' ); ?> |
||
| 39 | </button> |
||
| 40 | |||
| 41 | <div class="wl-input-notice"></div> |
||
| 42 | </div> |
||
| 43 | |||
| 44 | <?php |
||
| 45 | $html = ob_get_clean(); |
||
| 46 | |||
| 47 | return $html; |
||
| 48 | } |
||
| 49 | } |
||
| 50 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.