CallbackCachingPolicyController   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 5
c 1
b 0
f 0
dl 0
loc 17
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getModificationTimestamp() 0 3 1
A getCacheAge() 0 3 1
A getVary() 0 3 1
1
<?php
2
3
namespace SilverStripe\ControllerPolicy\Tests\CachingPolicyTest;
4
5
class CallbackCachingPolicyController extends CachingPolicyController
6
{
7
    private static $url_segment = 'CallbackCachingPolicyController';
0 ignored issues
show
introduced by
The private property $url_segment is not used, and could be removed.
Loading history...
8
9
    public function getCacheAge($age)
0 ignored issues
show
Unused Code introduced by
The parameter $age is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

9
    public function getCacheAge(/** @scrutinizer ignore-unused */ $age)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
10
    {
11
        return '1001';
12
    }
13
14
    public function getVary($vary)
0 ignored issues
show
Unused Code introduced by
The parameter $vary is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

14
    public function getVary(/** @scrutinizer ignore-unused */ $vary)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
15
    {
16
        return 'X-HeightWeight';
17
    }
18
19
    public function getModificationTimestamp()
20
    {
21
        return '5000';
22
    }
23
}
24