Completed
Pull Request — master (#6927)
by Damian
11:37 queued 03:26
created

ExtendTest2   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A extendableMethod() 0 5 1
1
<?php
2
3
namespace SilverStripe\Core\Tests\ObjectTest;
4
5
use SilverStripe\Core\Extension;
6
use SilverStripe\Dev\TestOnly;
7
8
class ExtendTest2 extends Extension implements TestOnly
9
{
10
    protected $constructorArgs = [];
11
12
    public function __construct()
13
    {
14
        $this->constructorArgs = func_get_args();
15
    }
16
17
    public function extendableMethod($argument = null)
0 ignored issues
show
Unused Code introduced by
The parameter $argument is not used and could be removed.

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

Loading history...
18
    {
19
        $args = implode(',', array_filter(func_get_args()));
20
        return "ExtendTest2($args)";
21
    }
22
}
23