PreviewRoutes   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 9
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 7 1
1
<?php
2
3
namespace Jidaikobo\Kontiki\Controllers\Routes;
4
5
use Slim\Routing\RouteCollectorProxy;
6
7
class PreviewRoutes
8
{
9
    public static function register(
10
        RouteCollectorProxy $app,
11
        string $basePath,
12
        string $controllerClass
13
    ): void {
14
        $app->get("/{$basePath}/preview", [$controllerClass, 'handlePreview']);
15
        $app->get("/{$basePath}/preview/{id}", [$controllerClass, 'handlePreviewById']);
16
    }
17
}
18