CampaignMonitorSegment   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 37
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A canCreate() 0 4 1
A canDelete() 0 4 1
A canEdit() 0 4 1
1
<?php
2
3
/**
4
 * @author nicolaas [at] sunnysideup.co.nz
5
 *
6
 * @description: this represents a sub group of a list, otherwise known as a segment
7
 *
8
 **/
9
10
class CampaignMonitorSegment extends DataObject
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
11
{
12
    private static $db = array(
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 $db 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...
13
        "Title" => "Varchar(64)",
14
        "SegmentID" => "Varchar(32)",
15
        "ListID" => "Varchar(32)"
16
    );
17
18
    private static $summary_fields = array(
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 $summary_fields 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...
19
        "Title" => "Title"
20
    );
21
22
    private static $indexes = array(
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 $indexes 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...
23
        "SegmentID" => true,
24
        "ListID" => true
25
    );
26
27
    private static $has_one = array(
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...
28
        "CampaignMonitorSignupPage" => "CampaignMonitorSignupPage"
29
    );
30
31
32
    public function canCreate($member = null)
33
    {
34
        return false;
35
    }
36
37
    public function canDelete($member = null)
38
    {
39
        return false;
40
    }
41
42
    public function canEdit($member = null)
43
    {
44
        return false;
45
    }
46
}
47