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

AbstractStrategy::getCandidates()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 2
eloc 4
nc 2
nop 1
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