Completed
Pull Request — master (#30)
by Robbie
02:10
created

BaseElementExtension   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A canView() 0 4 1
A canEdit() 0 4 1
A canDelete() 0 4 1
A canCreate() 0 4 1
1
<?php
2
/**
3
 * @package elemental
4
 */
5
class BaseElementExtension extends VersionedDataObject
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...
6
{
7
    /**
8
     * {@inheritDoc}
9
     */
10
    public function canView($member = null)
11
    {
12
        return Permission::check('CMS_ACCESS_CMSMain', 'any', $member);
13
    }
14
15
    /**
16
     * {@inheritDoc}
17
     */
18
    public function canEdit($member = null)
19
    {
20
        return Permission::check('CMS_ACCESS_CMSMain', 'any', $member);
21
    }
22
23
    /**
24
     * {@inheritDoc}
25
     */
26
    public function canDelete($member = null)
27
    {
28
        return Permission::check('CMS_ACCESS_CMSMain', 'any', $member);
29
    }
30
31
    /**
32
     * {@inheritDoc}
33
     */
34
    public function canCreate($member = null)
35
    {
36
        return Permission::check('CMS_ACCESS_CMSMain', 'any', $member);
37
    }
38
}
39