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