Failed Conditions
Branch newinternal (104de7)
by Simon
09:33
created

includes/Router/PublicRequestRouter.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Waca\Router;
4
5
use Waca\Pages\Request\PageConfirmEmail;
6
use Waca\Pages\Request\PageEmailConfirmationRequired;
7
use Waca\Pages\Request\PageRequestAccount;
8
use Waca\Pages\Request\PageRequestSubmitted;
9
10
class PublicRequestRouter extends RequestRouter
11
{
12
	/**
13
	 * Gets the route map to be used by this request router.
14
	 *
15
	 * @return array
0 ignored issues
show
Consider making the return type a bit more specific; maybe use array<string,array<string,array>>.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
16
	 */
17
	protected function getRouteMap()
18
	{
19
		return array(
20
			// Page showing a message stating the request has been submitted to our internal queues
21
			'requestSubmitted'          =>
22
				array(
23
					'class'   => PageRequestSubmitted::class,
24
					'actions' => array(),
25
				),
26
			// Page showing a message stating that email confirmation is required to continue
27
			'emailConfirmationRequired' =>
28
				array(
29
					'class'   => PageEmailConfirmationRequired::class,
30
					'actions' => array(),
31
				),
32
			// Action page which handles email confirmation
33
			'confirmEmail'              =>
34
				array(
35
					'class'   => PageConfirmEmail::class,
36
					'actions' => array(),
37
				),
38
		);
39
	}
40
41
	/**
42
	 * Gets the default route if no explicit route is requested.
43
	 *
44
	 * @return callable
0 ignored issues
show
Consider making the return type a bit more specific; maybe use string[].

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
45
	 */
46
	protected function getDefaultRoute()
47
	{
48
		return array(PageRequestAccount::class, 'main');
49
	}
50
}