CallbackCachingPolicyController::getVary()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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