Completed
Pull Request — master (#59)
by Tobias
07:03
created

AbstractStrategy   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCandidates() 0 8 2
1
<?php
2
3
namespace Http\Discovery\Strategy;
4
5
/**
6
 * @author Tobias Nyholm <[email protected]>
7
 */
8
abstract class AbstractStrategy implements DiscoveryStrategy
9
{
10
    protected static $classes = [];
11
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public static function getCandidates($type)
16
    {
17
        if (isset(static::$classes[$type])) {
18
            return static::$classes[$type];
19
        }
20
21
        return [];
22
    }
23
}
24