Completed
Pull Request — master (#59)
by Tobias
08:06
created

AbstractStrategy   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

1 Method

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