Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
22 / 22
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
CodeRouteDefinitionProvider
100.00% covered (success)
100.00%
22 / 22
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 getGlobalRoutes
100.00% covered (success)
100.00%
21 / 21
100.00% covered (success)
100.00%
1 / 1
1
 getActionsForBoundedContext
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\TypescriptClientBuilder\RouteDefinitions;
3
4use Apie\Common\Interfaces\GlobalRouteDefinitionProviderInterface;
5use Apie\Common\RouteDefinitions\ActionHashmap;
6use Apie\Core\BoundedContext\BoundedContext;
7use Apie\Core\Context\ApieContext;
8
9class CodeRouteDefinitionProvider implements GlobalRouteDefinitionProviderInterface
10{
11    public function getGlobalRoutes(): ActionHashmap
12    {
13        $routes = [];
14        $definition = new Es6ModuleRoute();
15        $routes[$definition->getOperationId()] = $definition;
16        $definition = new PlaygroundRoute();
17        $routes[$definition->getOperationId()] = $definition;
18        $definition = new StaticContentRoute(
19            __DIR__ . '/../../resources',
20            '/js/contents/ts'
21        );
22        $routes[$definition->getOperationId()] = $definition;
23        $definition = new StaticContentRoute(
24            __DIR__ . '/../../dist/es6',
25            '/js/contents/es6'
26        );
27        $routes[$definition->getOperationId()] = $definition;
28        $definition = new StaticContentRoute(
29            __DIR__ . '/../../dist/es5',
30            '/js/contents/es5'
31        );
32        $routes[$definition->getOperationId()] = $definition;
33        return new ActionHashmap($routes);
34    }
35
36    public function getActionsForBoundedContext(BoundedContext $boundedContext, ApieContext $apieContext): ActionHashmap
37    {
38        return new ActionHashmap();
39    }
40}