Passed
Push — master ( 54d781...72cc10 )
by Robbie
03:20
created

HistoryControllerFactoryExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 6
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateIsEnabled() 0 4 1
1
<?php
2
namespace SilverStripe\VersionedAdmin\Tests\Controller\HistoryControllerFactory;
3
4
use SilverStripe\Core\Extension;
5
use SilverStripe\Dev\TestOnly;
6
7
class HistoryControllerFactoryExtension extends Extension implements TestOnly
8
{
9
    public function updateIsEnabled($record)
10
    {
11
        // Only "enable" for the second fixture (from HistoryControllerFactoryTest.yml)
12
        return $record->Title === '2';
13
    }
14
}
15