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

updateIsEnabled()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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