Passed
Push — master ( f544cb...b3a3d9 )
by Nico
36:43 queued 09:10
created

ShowNewSandbox   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 11
ccs 0
cts 5
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Module\Admin\View\Sandbox;
6
7
use Stu\Module\Control\GameControllerInterface;
8
use Stu\Module\Control\ViewControllerInterface;
9
10
final class ShowNewSandbox implements ViewControllerInterface
11
{
12
    public const VIEW_IDENTIFIER = 'SHOW_NEW_SANDBOX';
13
14
    public function handle(GameControllerInterface $game): void
15
    {
16
        $game->setPageTitle(_('Neue Sandbox erstellen'));
17
        $game->setMacroInAjaxWindow('html/admin/sandbox/newSandbox.twig');
18
19
        $game->setTemplateVar('SANDBOX_LIST', $game->getUser()->getColonies()->toArray());
20
        $game->setTemplateVar('SANDBOX_NAME', sprintf('SANDBOX %s', date('d M Y')));
21
    }
22
}
23