DummyFactoryStrategy   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A matches() 0 4 1
A create() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * phpDocumentor
6
 *
7
 * PHP Version 5.5
8
 *
9
 * @copyright 2010-2018 Mike van Riel / Naenius (http://www.naenius.com)
10
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
11
 * @link      http://phpdoc.org
12
 */
13
14
namespace phpDocumentor\Reflection\Php\Factory;
15
16
use phpDocumentor\Reflection\Element;
17
use phpDocumentor\Reflection\Php\ProjectFactoryStrategy;
18
use phpDocumentor\Reflection\Php\StrategyContainer;
19
use phpDocumentor\Reflection\Types\Context;
20
21
/**
22
 * Stub for test purpose only.
23
 */
24
final class DummyFactoryStrategy implements ProjectFactoryStrategy
25
{
26
    /**
27
     * Returns true when the strategy is able to handle the object.
28
     *
29
     *
30
     * @param mixed $object object to check.
31
     */
32
    public function matches($object): bool
33
    {
34
        return true;
35
    }
36
37
    /**
38
     * Creates an Element out of the given object.
39
     *
40
     * Since an object might contain other objects that need to be converted the $factory is passed so it can be
41
     * used to create nested Elements.
42
     *
43
     * @param object $object object to convert to an Element
44
     * @param StrategyContainer $strategies used to convert nested objects.
45
     * @return Element
46
     */
47
    public function create($object, StrategyContainer $strategies, Context $context = null)
48
    {
49
    }
50
}
51