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

updateItemRequestClass()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 6
rs 9.4285
cc 3
eloc 3
nc 2
nop 4
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