Completed
Push — master ( 2f705a...c06b8c )
by Simon
01:46
created

PartialFormSubmission   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A canEdit() 0 4 1
A canDelete() 0 4 1
1
<?php
2
3
namespace Firesphere\PartialUserforms\Models;
4
5
use SilverStripe\UserForms\Model\Submission\SubmittedForm;
6
use SilverStripe\UserForms\Model\UserDefinedForm;
7
8
/**
9
 * Class \Firesphere\PartialUserforms\Models\PartialFormSubmission
10
 *
11
 * @property int $UserDefinedFormID
12
 * @method \SilverStripe\UserForms\Model\UserDefinedForm UserDefinedForm()
13
 * @method \SilverStripe\ORM\DataList|\Firesphere\PartialUserforms\Models\PartialFieldSubmission[] PartialFields()
14
 */
15
class PartialFormSubmission extends SubmittedForm
16
{
17
    private static $table_name = 'PartialFormSubmission';
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
Unused Code introduced by
The property $table_name is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
18
19
    private static $has_one = [
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
Unused Code introduced by
The property $has_one is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
20
        'UserDefinedForm' => UserDefinedForm::class
21
    ];
22
23
    private static $has_many = [
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
Unused Code introduced by
The property $has_many is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
24
        'PartialFields' => PartialFieldSubmission::class
25
    ];
26
27
    public function canEdit($member = null)
28
    {
29
        return false;
30
    }
31
32
    public function canDelete($member = null)
33
    {
34
        return false;
35
    }
36
}
37