Silex   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A extract() 0 8 2
1
<?php
2
3
namespace Silex\Component\Tactician\CommandNameExtractor;
4
5
use League\Tactician\Handler\CommandNameExtractor\CommandNameExtractor;
6
7
/**
8
 * Class Silex
9
 * @package Silex\Component\Tactician\CommandNameExtractor
10
 */
11
class Silex implements CommandNameExtractor
12
{
13
    /**
14
     * @param object $command
15
     * @return string
16
     */
17
    public function extract($command)
18
    {
19
        if (! is_object($command)) {
20
            throw new \InvalidArgumentException('Command must be an object');
21
        }
22
23
        return get_class($command);
24
    }
25
}
26