Completed
Push — master ( 0513f3...46cdfb )
by Daniel
03:05
created

MethodLoader   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 19
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A load() 0 10 1
A supports() 0 4 1
1
<?php
2
3
namespace Cmobi\CmobiRabbitmqBundle\Routing;
4
5
use Cmobi\RabbitmqBundle\Routing\MethodCollection;
6
use Symfony\Component\Config\Loader\Loader;
7
8
class MethodLoader extends Loader
9
{
10
11
    public function load($resource, $type = null)
12
    {
13
        $collection = new MethodCollection();
14
        $resource = 'app/config/rpc_routing.yml';
15
        $type = 'yaml';
16
        $importedRouters = $this->import($resource, $type);
17
        $collection->addCollection($importedRouters);
18
19
        return $collection;
20
    }
21
22
    public function supports($resource, $type = null)
23
    {
24
        return 'rpc' === $type;
25
    }
26
}