Passed
Pull Request — master (#91)
by Robbie
01:53
created

MockHashExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateHash() 0 3 1
1
<?php
2
3
namespace SilverStripe\MFA\Tests\Service\BackupCodeGeneratorTest;
4
5
use SilverStripe\Core\Extension;
6
use SilverStripe\Dev\TestOnly;
7
8
class MockHashExtension extends Extension implements TestOnly
9
{
10
    /**
11
     * Mock the hashing process by returning the reversed input
12
     *
13
     * @param string $code
14
     * @param string $hash
15
     */
16
    public function updateHash($code, &$hash)
17
    {
18
        $hash = strrev($code);
19
    }
20
}
21