Passed
Branch facadeless (e1adef)
by Atanas
14:27 queued 12:23
created

Application::error()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
dl 0
loc 1
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * @package   WPEmerge
4
 * @author    Atanas Angelov <[email protected]>
5
 * @copyright 2017-2019 Atanas Angelov
6
 * @license   https://www.gnu.org/licenses/gpl-2.0.html GPL-2.0
7
 * @link      https://wpemerge.com/
8
 */
9
10
/**
11
 * A helper file for aliased methods.
12
 */
13
namespace  {
14
	exit( 'This file should not be included, only analyzed by your IDE.' );
15
}
16
17
namespace WPEmerge\Application {
18
19
	use Psr\Http\Message\ResponseInterface;
20
	use WPEmerge\Requests\RequestInterface;
21
	use WPEmerge\Responses\RedirectResponse;
22
	use WPEmerge\View\ViewInterface;
23
24
	class Application {
25
		/**
26
		 * Create a "blank" response.
27
		 *
28
		 * @codeCoverageIgnore
29
		 * @see    \WPEmerge\Responses\ResponseService::response()
30
		 * @return ResponseInterface
31
		 */
32
		public static function response() {}
33
34
		/**
35
		 * Create a response with the specified string as its body.
36
		 *
37
		 * @codeCoverageIgnore
38
		 * @see    \WPEmerge\Responses\ResponseService::output()
39
		 * @param  string            $output
40
		 * @return ResponseInterface
41
		 */
42
		public static function output( $output ) {}
43
44
		/**
45
		 * Create a response with the specified data encoded as JSON as its body.
46
		 *
47
		 * @codeCoverageIgnore
48
		 * @see    \WPEmerge\Responses\ResponseService::json()
49
		 * @param  mixed             $data
50
		 * @return ResponseInterface
51
		 */
52
		public static function json( $data ) {}
53
54
		/**
55
		 * Create a redirect response.
56
		 *
57
		 * @codeCoverageIgnore
58
		 * @see    \WPEmerge\Responses\ResponseService::redirect()
59
		 * @return RedirectResponse
60
		 */
61
		public static function redirect() {}
62
63
		/**
64
		 * Create a view.
65
		 *
66
		 * @codeCoverageIgnore
67
		 * @see    \WPEmerge\View\ViewService::make()
68
		 * @param  string|array<string> $views
69
		 * @return ViewInterface
70
		 */
71
		public static function view( $views ) {}
72
73
		/**
74
		 * Create a response with the specified error status code.
75
		 *
76
		 * @codeCoverageIgnore
77
		 * @see    \WPEmerge\Responses\ResponseService::error()
78
		 * @param  integer           $status
79
		 * @return ResponseInterface
80
		 */
81
		public static function error( $status ) {}
82
83
		/**
84
		 * Output the specified view.
85
		 *
86
		 * @codeCoverageIgnore
87
		 * @see    \WPEmerge\View\ViewService::make()
88
		 * @see    \WPEmerge\View\ViewInterface::toString()
89
		 * @param  string|array<string> $views
90
		 * @param  array<string, mixed> $context
91
		 * @return void
92
		 */
93
		public static function render( $views, $context = [] ) {}
94
95
		/**
96
		 * Output child layout content.
97
		 *
98
		 * @codeCoverageIgnore
99
		 * @see    \WPEmerge\View\PhpViewEngine::getLayoutContent()
100
		 * @return void
101
		 */
102
		public static function layoutContent() {}
103
104
		/**
105
		 * Run a full middleware + handler pipeline independently of routes.
106
		 *
107
		 * @codeCoverageIgnore
108
		 * @see    \WPEmerge\Kernels\HttpKernel::run()
109
		 * @param  RequestInterface  $request
110
		 * @param  array<string>     $middleware
111
		 * @param  string|\Closure   $handler
112
		 * @param  array             $arguments
113
		 * @return ResponseInterface
114
		 */
115
		public static function run( RequestInterface $request, $middleware, $handler, $arguments = [] ) {}
116
	}
117
}
118