DescribeService::loadRoutes()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
ccs 0
cts 5
cp 0
crap 2
1
<?php
2
/**
3
 * Copyright 2016 - 2018, Cake Development Corporation (http://cakedc.com)
4
 *
5
 * Licensed under The MIT License
6
 * Redistributions of files must retain the above copyright notice.
7
 *
8
 * @copyright Copyright 2016 - 2018, Cake Development Corporation (http://cakedc.com)
9
 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
10
 */
11
12
namespace CakeDC\Api\Service;
13
14
use CakeDC\Api\Routing\ApiRouter;
15
use Cake\Routing\RouteBuilder;
16
17
class DescribeService extends Service
18
{
19
20
    /**
21
     * @var array
22
     */
23
    protected $_actionsClassMap = [
24
        'describe' => '\CakeDC\Api\Service\Action\DescribeAction',
25
    ];
26
27
    /**
28
     * @inheritdoc
29
     *
30
     * @return void
31
     */
32
    public function loadRoutes()
33
    {
34
        ApiRouter::scope('/', function (RouteBuilder $routes) {
35
            $routes->setExtensions($this->_routeExtensions);
36
            $routes->connect('/describe/', ['controller' => 'describe', 'action' => 'describe']);
37
        });
38
    }
39
}
40