Completed
Pull Request — master (#98)
by Robbie
01:48
created

MockDataObjectAnnotator::getGeneratedFileContent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace SilverLeague\IDEAnnotator\tests;
4
5
use SilverLeague\IDEAnnotator\DataObjectAnnotator;
6
use SilverStripe\Dev\TestOnly;
7
8
/**
9
 * Class MockDataObjectAnnotator
10
 * Overload DataObjectAnnotator to make protected methods testable.
11
 * In this way we can just test the generated annotations without actually writing the files.
12
 */
13
class MockDataObjectAnnotator extends DataObjectAnnotator implements TestOnly
14
{
15
16
    /**
17
     * @param $fileContent
18
     * @param $className
19
     *
20
     * @return mixed
21
     * @throws \ReflectionException
22
     */
23
    public function getGeneratedFileContent($fileContent, $className)
24
    {
25
        return parent::getGeneratedFileContent($fileContent, $className);
26
    }
27
}
28
29