Completed
Push — master ( 84107b...f0cb22 )
by Robbie
11s
created

DetectLocaleMiddlewareSpy   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __call() 0 4 2
1
<?php
2
3
namespace TractorCow\Fluent\Tests\Middleware\Stub;
4
5
use TractorCow\Fluent\Middleware\DetectLocaleMiddleware;
6
use SilverStripe\Dev\TestOnly;
7
8
/**
9
 * Opens up DetectLocaleMiddleware protected methods for unit testing
10
 */
11
class DetectLocaleMiddlewareSpy extends DetectLocaleMiddleware implements TestOnly
12
{
13
    public function __call($method, $arguments)
14
    {
15
        if (method_exists($this, $method)) {
16
            return $this->$method(...$arguments);
17
        }
18
    }
19
}
20