| Total Complexity | 4 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class Recipe { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Holds class instance |
||
| 17 | * |
||
| 18 | * @since 1.0.0 |
||
| 19 | * |
||
| 20 | * @var object \lsx_health_plan\classes\admin\Recipe() |
||
| 21 | */ |
||
| 22 | protected static $instance = null; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Contructor |
||
| 26 | */ |
||
| 27 | public function __construct() { |
||
| 28 | add_action( 'lsx_hp_settings_page_recipe_top', array( $this, 'settings' ), 1, 1 ); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Return an instance of this class. |
||
| 33 | * |
||
| 34 | * @since 1.0.0 |
||
| 35 | * |
||
| 36 | * @return object \lsx_health_plan\classes\admin\Recipe() A single instance of this class. |
||
| 37 | */ |
||
| 38 | public static function get_instance() { |
||
| 39 | // If the single instance hasn't been set, set it now. |
||
| 40 | if ( null === self::$instance ) { |
||
| 41 | self::$instance = new self(); |
||
| 42 | } |
||
| 43 | return self::$instance; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Registers the general settings. |
||
| 48 | * |
||
| 49 | * @param object $cmb new_cmb2_box(). |
||
| 50 | * @return void |
||
| 51 | */ |
||
| 52 | public function settings( $cmb ) { |
||
| 59 | ) |
||
| 60 | ); |
||
| 61 | } |
||
| 64 |