Completed
Push — master ( 2fdc96...4f1f24 )
by Damian
12:09
created

VersionedGridFieldDetailForm   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 8
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateItemRequestClass() 0 6 3
1
<?php
2
3
/**
4
 * Extends {@see GridFieldDetailForm}
5
 */
6
class VersionedGridFieldDetailForm extends Extension {
7
    public function updateItemRequestClass(&$class, $gridField, $record, $requestHandler) {
0 ignored issues
show
Unused Code introduced by
The parameter $gridField 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...
Unused Code introduced by
The parameter $requestHandler 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...
8
        // Conditionally use a versioned item handler
9
        if($record && $record->has_extension('Versioned')) {
10
            $class = 'VersionedGridFieldItemRequest';
11
        }
12
    }
13
}
14