Code Duplication    Length = 10-10 lines in 6 locations

src/functions.php 6 locations

@@ 7-16 (lines=10) @@
4
use WPEmerge\Responses\Response;
5
use WPEmerge\Helpers\Mixed;
6
7
if ( ! function_exists( 'app_response' ) ) {
8
	/**
9
	 * @codeCoverageIgnore
10
	 * @see Response::response()
11
	 * @return \Psr\Http\Message\ResponseInterface
12
	 */
13
	function app_response() {
14
		return call_user_func_array( [Response::class, 'response'], func_get_args() );
15
	}
16
}
17
18
if ( ! function_exists( 'app_output' ) ) {
19
	/**
@@ 18-27 (lines=10) @@
15
	}
16
}
17
18
if ( ! function_exists( 'app_output' ) ) {
19
	/**
20
	 * @codeCoverageIgnore
21
	 * @see Response::output()
22
	 * @return \Psr\Http\Message\ResponseInterface
23
	 */
24
	function app_output( $output ) {
25
		return call_user_func_array( [Response::class, 'output'], func_get_args() );
26
	}
27
}
28
29
if ( ! function_exists( 'app_json' ) ) {
30
	/**
@@ 29-38 (lines=10) @@
26
	}
27
}
28
29
if ( ! function_exists( 'app_json' ) ) {
30
	/**
31
	 * @codeCoverageIgnore
32
	 * @see Response::json()
33
	 * @return \Psr\Http\Message\ResponseInterface
34
	 */
35
	function app_json( $data ) {
36
		return call_user_func_array( [Response::class, 'json'], func_get_args() );
37
	}
38
}
39
40
if ( ! function_exists( 'app_redirect' ) ) {
41
	/**
@@ 40-49 (lines=10) @@
37
	}
38
}
39
40
if ( ! function_exists( 'app_redirect' ) ) {
41
	/**
42
	 * @codeCoverageIgnore
43
	 * @see Response::redirect()
44
	 * @return \Psr\Http\Message\ResponseInterface
45
	 */
46
	function app_redirect() {
47
		return call_user_func_array( [Response::class, 'redirect'], func_get_args() );
48
	}
49
}
50
51
if ( ! function_exists( 'app_view' ) ) {
52
	/**
@@ 51-60 (lines=10) @@
48
	}
49
}
50
51
if ( ! function_exists( 'app_view' ) ) {
52
	/**
53
	 * @codeCoverageIgnore
54
	 * @see Response::view()
55
	 * @return \Psr\Http\Message\ResponseInterface
56
	 */
57
	function app_view( $views, $context = [] ) {
58
		return call_user_func_array( [Response::class, 'view'], func_get_args() );
59
	}
60
}
61
62
if ( ! function_exists( 'app_error' ) ) {
63
	/**
@@ 62-71 (lines=10) @@
59
	}
60
}
61
62
if ( ! function_exists( 'app_error' ) ) {
63
	/**
64
	 * @codeCoverageIgnore
65
	 * @see Response::error()
66
	 * @return \Psr\Http\Message\ResponseInterface
67
	 */
68
	function app_error( $code ) {
69
		return call_user_func_array( [Response::class, 'error'], func_get_args() );
70
	}
71
}
72
73
if ( ! function_exists( 'app_partial' ) ) {
74
	/**