ListingService   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 20
rs 10
ccs 5
cts 5
cp 1
wmc 1
lcom 1
cbo 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A loadRoutes() 0 7 1
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
/**
18
 * Class ListingService
19
 *
20
 * @package CakeDC\Api\Service
21
 */
22
class ListingService extends Service
23
{
24
25
    protected $_actionsClassMap = [
26
        'list' => '\CakeDC\Api\Service\Action\ListAction',
27
    ];
28
29
    /**
30
     * Initialize service level routes
31
     *
32
     * @return void
33
     */
34
    public function loadRoutes()
35
    {
36 1
        ApiRouter::scope('/', function (RouteBuilder $routes) {
37 1
            $routes->setExtensions($this->_routeExtensions);
38 1
            $routes->connect('/listing/', ['controller' => 'listing', 'action' => 'list']);
39 1
        });
40 1
    }
41
}
42