Issues (4138)

includes/functions/recipes.php (6 issues)

1
<?php
2
/**
3
 * LSX Health Plan WooCommerce functions.
4
 *
5
 * @package lsx-health-plan
6
 */
7
8
namespace lsx_health_plan\functions\recipes;
9
10
/**
11
 * Returns true or false if the plan has products.
12
 *
13
 * @param array $args
0 ignored issues
show
Coding Style Documentation introduced by
Missing parameter comment
Loading history...
Superfluous parameter comment
Loading history...
14
 * @return boolean
0 ignored issues
show
Function return type is not void, but function has no return statement
Loading history...
15
 */
16
function register_recipe_modal() {
0 ignored issues
show
Expected 2 blank lines before function; 1 found
Loading history...
17
	remove_action( 'lsx_content_sharing', 'lsx_sharing_output', 20 );
18
	ob_start();
19
	include LSX_HEALTH_PLAN_PATH . '/templates/content-recipe.php';
20
	$modal_body = ob_get_clean();
21
	add_action( 'lsx_content_sharing', 'lsx_sharing_output', 20 );
22
	\lsx_health_plan\functions\register_modal( 'recipe-modal-' . get_the_ID(), '', $modal_body );
0 ignored issues
show
Are you sure get_the_ID() of type false|integer can be used in concatenation? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

22
	\lsx_health_plan\functions\register_modal( 'recipe-modal-' . /** @scrutinizer ignore-type */ get_the_ID(), '', $modal_body );
Loading history...
23
}
0 ignored issues
show
Expected 1 blank line before closing function brace; 0 found
Loading history...
24